Note: At the time of writing the query builder classes are reworked so they can handle multiple sql dialects.
The abstraction of writing SQL for database queries is done by the Query Builder. The query builder consists a set of classes, each handling a specific part of the query building process.
Using the query builder is will go unnoticed most of the times as the DB class provides shortcuts for creating new query builder objects. It's advised to use these methods to get the right query builder. this is common practice and will keep your code readable.
Here are the classes that query builder consists of: