AbstractQuery is the base class for all query classes.
- Author
- ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m
Definition at line 26 of file AbstractQuery.php.
◆ getLogger()
Get the logger.
- Returns
- Logger
Reimplemented in ObjectQuery.
◆ getQueryType()
Get the name of the entity type that should be queried.
- Returns
- String
Reimplemented in ObjectQuery.
◆ execute()
execute |
( |
|
$buildDepth, |
|
|
|
$orderby = null , |
|
|
|
$pagingInfo = null |
|
) |
| |
Execute the query.
- Parameters
-
$buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to load (except BuildDepth::REQUIRED) or false if only object ids should be returned |
$orderby | An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (maybe null) (default: null) |
$pagingInfo | A reference paging info instance (optional, default: null) |
- Returns
- A list of objects that match the given conditions or a list of object ids
Definition at line 50 of file AbstractQuery.php.
◆ getQueryString()
Get the query serialized to a string.
Placeholder are replaced with quoted values.
- Parameters
-
$buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to load (except BuildDepth::REQUIRED) or false if only object ids should be returned (optional, default: BuildDepth::SINGLE) |
$orderby | An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: null) |
- Returns
- String
Definition at line 73 of file AbstractQuery.php.
◆ getLastQueryString()
Get the query last executed serialized to a string.
- Returns
- String
Definition at line 88 of file AbstractQuery.php.
◆ buildQuery()
buildQuery |
( |
|
$buildDepth, |
|
|
|
$orderby = null , |
|
|
PagingInfo |
$pagingInfo = null |
|
) |
| |
|
abstractprotected |
Build the query.
- Parameters
-
$buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to load (except BuildDepth::REQUIRED) or false if only object ids should be returned |
$orderby | An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: null) |
$pagingInfo | A reference paging info instance (optional, default: null) |
- Returns
- SelectStatement instance
Reimplemented in ObjectQuery, and StringQuery.
◆ executeInternal()
Execute the query and return the results.
- Parameters
-
$selectStmt | A SelectStatement instance |
$buildDepth | One of the BUILDDEPTH constants or a number describing the number of generations to load (except BuildDepth::REQUIRED) or false if only object ids should be returned |
$pagingInfo | A reference paging info instance (default: null) |
- Returns
- A list of objects that match the given conditions or a list of object ids
Definition at line 113 of file AbstractQuery.php.
◆ getConnection()
static getConnection |
( |
|
$type | ) |
|
|
staticprotected |
Get the database connection of the given node type.
- Parameters
-
$type | The node type to get the connection from connection |
- Returns
- The connection
Definition at line 163 of file AbstractQuery.php.
◆ getMapper()
static getMapper |
( |
|
$type | ) |
|
|
staticprotected |
Get the mapper for a Node and check if it is a supported one.
- Parameters
-
$type | The type of Node to get the mapper for |
- Returns
- RDBMapper instance
Definition at line 174 of file AbstractQuery.php.