Method |
Description |
|
__call ( string $method, array $args ) : mixed |
Run user-added callback |
|
__construct ( Mapper $mapper ) |
Constructor Method |
|
addMethod ( string $method, callable $callback ) |
Add a custom user method via closure or PHP callback |
|
addWhereOperator ( string $operator, callable | string $action ) |
Adds a custom type to the type map. |
|
andWhere ( array $where, string $type = 'AND' ) |
WHERE AND conditions |
|
builder ( ) : Doctrine\DBAL\Query\QueryBuilder |
Get current Doctrine DBAL query builder object |
|
count ( ) : integer |
SPL Countable function
Called automatically when attribute is used in a 'count()' function call |
|
delete ( ) |
Delete (passthrough to DBAL QueryBuilder) |
|
entityName ( ) : string |
Get current entity name query is to be performed on |
|
escape ( string $string ) : string |
Escape/quote direct user input |
|
escapeIdentifier ( string | array $identifier ) : string | array |
Escape/quote identifier |
|
execute ( ) : mixed |
Execute and return query as a collection |
|
expr ( ) : Doctrine\DBAL\Query\Expression\ExpressionBuilder |
Return DBAL Query builder expression |
|
fieldWithAlias ( string $field, boolean $escaped = true ) : string |
Get field name with table alias appended |
|
first ( ) : mixed |
Return the first entity matched by the query |
|
from ( ) |
From (passthrough to DBAL QueryBuilder) |
|
getIterator ( ) : Collection |
SPL IteratorAggregate function
Called automatically when attribute is used in a 'foreach' loop |
|
getParameters ( ) : mixed |
Get all bound query parameters (passthrough to DBAL QueryBuilder) |
|
group ( array $fields = [] ) |
GROUP BY clause |
|
having ( array $having, string $type = 'AND' ) |
Having clause to filter results by a calculated value |
|
jsonSerialize ( ) |
JsonSerializable |
|
limit ( integer $limit, integer $offset = null ) |
Limit executed query to specified amount of records
Implemented at adapter-level for databases that support it |
|
mapper ( ) : Mapper |
Get current adapter object |
|
noQuote ( boolean $noQuote = true ) |
Set field and value quoting on/off - maily used for testing output SQL
since quoting is different per platform |
|
offset ( integer $offset ) |
Offset executed query to skip specified amount of records
Implemented at adapter-level for databases that support it |
|
offsetExists ( $key ) |
SPL - ArrayAccess |
|
offsetGet ( $key ) |
SPL - ArrayAccess |
|
offsetSet ( $key, $value ) |
SPL - ArrayAccess |
|
offsetUnset ( $key ) |
SPL - ArrayAccess |
|
orWhere ( array $where, string $type = 'AND' ) |
WHERE OR conditions |
|
order ( array $order ) |
ORDER BY columns |
|
search ( mixed $fields, string $query, array $options = [] ) |
Search criteria (FULLTEXT, LIKE, or REGEX, depending on storage engine and driver) |
|
select ( ) |
Select (passthrough to DBAL QueryBuilder) |
|
setParameters ( ) |
Set query parameters (passthrough to DBAL QueryBuilder) |
|
toArray ( string | null $keyColumn = null, string | null $valueColumn = null ) : array |
Convenience function passthrough for Collection |
|
toSql ( ) : string |
Get raw SQL string from built query |
|
unescapeIdentifier ( string $identifier ) : string |
Removes escape/quote character |
|
where ( array $where, string $type = 'AND' ) |
WHERE conditions |
|
whereFieldSql ( string $field, string $sql, array $params = [] ) |
WHERE field + raw SQL |
|
whereSql ( string $sql ) |
WHERE conditions |
|
with ( mixed | null $relations = null ) |
Relations to be eager-loaded |
|