This section describes the process to build SQL queries.
Query build process is made in three steps:
The conductor of this process is the Query object. Give it a Connection and a Builder instances, and you have your entry point!
The builder is aimed to provide a rich interface for the user to construct the
query: where()
, whereHas()
, limit()
...
There is one builder per query type.
The compiler build the query components.
Currently, there is one BaseCompiler
class to handle any query. This basic
compiler can be extended to adapt to different DBMS.
Appropriate Compiler is chosen by Connection.
This is the bridge between the database and the rest of the code.