Doctrine DBAL provides a set of PHP objects to represent, create and handle SQL queries and their results. The basic class structure has been slightly enriched by TYPO3 to add CMS-specific features. Extension authors will usually interact with these classes and objects:
This object represents a specific connection to one connected database. It provides "shortcut" methods for simple standard queries like
UPDATE. To create more complex queries, an instance of the QueryBuilder can be retrieved.
The ConnectionPool is the main entry point for extensions to retrieve a specific connection over which to execute a query. Usually it is used to return a Connection or a QueryBuilder object.
The ExpressionBuilder object is used to model complex expressions. It is mainly used for
With the help of the QueryBuilder one can create all sort of complex queries executed on a specific connection. It provides the main CRUD methods for
Restrictions are a set of classes that add expressions like
deleted=0to a query, based on the TCA settings of a table. They automatically adds TYPO3-specific restrictions like start time and end time, as well as deleted and hidden flags. Further restrictions for language overlays and workspaces are available. In this documentation, these classes are referred as
This result object is returned when a
COUNTquery was executed. Single rows are returned as an array by calling
->fetchAssociative()until the method returns