TYPO3
7.6
|
Public Member Functions | |
getSource () | |
execute ($returnRawQueryResult=false) | |
setOrderings (array $orderings) | |
setLimit ($limit) | |
setOffset ($offset) | |
matching ($constraint) | |
logicalAnd ($constraint1) | |
logicalOr ($constraint1) | |
logicalNot (ConstraintInterface $constraint) | |
equals ($propertyName, $operand, $caseSensitive=true) | |
like ($propertyName, $operand, $caseSensitive=true) | |
contains ($propertyName, $operand) | |
in ($propertyName, $operand) | |
lessThan ($propertyName, $operand) | |
lessThanOrEqual ($propertyName, $operand) | |
greaterThan ($propertyName, $operand) | |
greaterThanOrEqual ($propertyName, $operand) | |
getType () | |
setQuerySettings (Generic\QuerySettingsInterface $querySettings) | |
getQuerySettings () | |
count () | |
getOrderings () | |
getLimit () | |
getOffset () | |
getConstraint () | |
isEmpty ($propertyName) | |
setSource (Generic\Qom\SourceInterface $source) | |
getStatement () | |
Public Attributes | |
const | OPERATOR_EQUAL_TO = 1 |
const | OPERATOR_EQUAL_TO_NULL = 101 |
const | OPERATOR_NOT_EQUAL_TO = 2 |
const | OPERATOR_NOT_EQUAL_TO_NULL = 202 |
const | OPERATOR_LESS_THAN = 3 |
const | OPERATOR_LESS_THAN_OR_EQUAL_TO = 4 |
const | OPERATOR_GREATER_THAN = 5 |
const | OPERATOR_GREATER_THAN_OR_EQUAL_TO = 6 |
const | OPERATOR_LIKE = 7 |
const | OPERATOR_CONTAINS = 8 |
const | OPERATOR_IN = 9 |
const | OPERATOR_IS_NULL = 10 |
const | OPERATOR_IS_EMPTY = 11 |
const | ORDER_ASCENDING = 'ASC' |
const | ORDER_DESCENDING = 'DESC' |
A persistence query interface
Definition at line 27 of file QueryInterface.php.
contains | ( | $propertyName, | |
$operand | |||
) |
Returns a "contains" criterion used for matching objects against a query. It matches if the multivalued property contains the given operand.
If NULL is given as $operand, there will never be a match!
string | $propertyName | The name of the multivalued property to compare against |
mixed | $operand | The value to compare with |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a single-valued property |
Implemented in Query.
count | ( | ) |
equals | ( | $propertyName, | |
$operand, | |||
$caseSensitive = true |
|||
) |
Returns an equals criterion used for matching objects against a query.
It matches if the $operand equals the value of the property named $propertyName. If $operand is NULL a strict check for NULL is done. For strings the comparison can be done with or without case-sensitivity.
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
bool | $caseSensitive | Whether the equality test should be done case-sensitive for strings |
Implemented in Query.
execute | ( | $returnRawQueryResult = false | ) |
Executes the query and returns the result.
bool | $returnRawQueryResult | avoids the object mapping by the persistence |
Implemented in Query.
getConstraint | ( | ) |
Gets the constraint for this query.
Implemented in Query.
Referenced by Typo3DbBackend\getObjectCountByQuery(), Typo3DbQueryParser\parseQuery(), and Typo3DbQueryParser\preparseQuery().
getLimit | ( | ) |
Returns the maximum size of the result set to limit.
Implemented in Query.
Referenced by Typo3DbQueryParser\parseQuery().
getOffset | ( | ) |
Returns the start offset of the result set.
Implemented in Query.
Referenced by Typo3DbQueryParser\parseQuery().
getOrderings | ( | ) |
Gets the property names to order the result by, like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING )
Implemented in Query.
Referenced by Typo3DbQueryParser\parseQuery(), and Typo3DbQueryParser\preparseQuery().
getQuerySettings | ( | ) |
Returns the Query Settings.
Implemented in Query.
Referenced by Typo3DbBackend\getObjectDataByQuery(), Typo3DbBackend\getRowsByStatementParts(), Typo3DbQueryParser\parseQuery(), and Typo3DbQueryParser\preparseQuery().
getSource | ( | ) |
Gets the node-tuple source for this query.
Implemented in Query.
Referenced by Typo3DbBackend\getObjectDataByQuery(), Typo3DbQueryParser\parseQuery(), and Typo3DbQueryParser\preparseQuery().
getStatement | ( | ) |
Returns the statement of this query.
Implemented in Query.
Referenced by Typo3DbBackend\getObjectDataByQuery().
getType | ( | ) |
greaterThan | ( | $propertyName, | |
$operand | |||
) |
Returns a greater than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a multi-valued property or with a non-literal/non-DateTime operand |
Implemented in Query.
greaterThanOrEqual | ( | $propertyName, | |
$operand | |||
) |
Returns a greater than or equal criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a multi-valued property or with a non-literal/non-DateTime operand |
Implemented in Query.
in | ( | $propertyName, | |
$operand | |||
) |
Returns an "in" criterion used for matching objects against a query. It matches if the property's value is contained in the multivalued operand.
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with, multivalued |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a multi-valued property |
Implemented in Query.
isEmpty | ( | $propertyName | ) |
Returns an "isEmpty" criterion used for matching objects against a query. It matches if the multivalued property contains no values or is NULL.
string | $propertyName | The name of the multivalued property to compare against |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a single-valued property |
Implemented in Query.
lessThan | ( | $propertyName, | |
$operand | |||
) |
Returns a less than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a multi-valued property or with a non-literal/non-DateTime operand |
Implemented in Query.
lessThanOrEqual | ( | $propertyName, | |
$operand | |||
) |
Returns a less or equal than criterion used for matching objects against a query
string | $propertyName | The name of the property to compare against |
mixed | $operand | The value to compare with |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a multi-valued property or with a non-literal/non-DateTime operand |
Implemented in Query.
like | ( | $propertyName, | |
$operand, | |||
$caseSensitive = true |
|||
) |
Returns a like criterion used for matching objects against a query. Matches if the property named $propertyName is like the $operand, using standard SQL wildcards.
string | $propertyName | The name of the property to compare against |
string | $operand | The value to compare with |
bool | $caseSensitive | Whether the matching should be done case-sensitive |
\TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException | if used on a non-string property |
Implemented in Query.
logicalAnd | ( | $constraint1 | ) |
Performs a logical conjunction of the two given constraints. The method takes one or more constraints and concatenates them with a boolean AND. It also accepts a single array of constraints to be concatenated.
mixed | $constraint1 | The first of multiple constraints or an array of constraints. |
Implemented in Query.
logicalNot | ( | ConstraintInterface | $constraint | ) |
Performs a logical negation of the given constraint
ConstraintInterface | $constraint | Constraint to negate |
logicalOr | ( | $constraint1 | ) |
Performs a logical disjunction of the two given constraints. The method takes one or more constraints and concatenates them with a boolean OR. It also accepts a single array of constraints to be concatenated.
mixed | $constraint1 | The first of multiple constraints or an array of constraints. |
Implemented in Query.
matching | ( | $constraint | ) |
The constraint used to limit the result set. Returns $this to allow for chaining (fluid interface).
ConstraintInterface | $constraint | Some constraint, depending on the backend |
Implemented in Query.
setLimit | ( | $limit | ) |
Sets the maximum size of the result set to limit. Returns $this to allow for chaining (fluid interface).
int | $limit |
Implemented in Query.
setOffset | ( | $offset | ) |
Sets the start offset of the result set to offset. Returns $this to allow for chaining (fluid interface).
int | $offset |
Implemented in Query.
setOrderings | ( | array | $orderings | ) |
Sets the property names to order the result by. Expected like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING )
array | $orderings | The property names to order by |
Implemented in Query.
setQuerySettings | ( | Generic\QuerySettingsInterface | $querySettings | ) |
Sets the Query Settings. These Query settings must match the settings expected by the specific Storage Backend.
\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface | $querySettings | The Query Settings |
setSource | ( | Generic\Qom\SourceInterface | $source | ) |
Sets the source to fetch the result from
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface | $source |
const OPERATOR_CONTAINS = 8 |
The 'contains' comparison operator for collections.
Definition at line 97 of file QueryInterface.php.
Referenced by Query\contains(), and Typo3DbQueryParser\parseComparison().
const OPERATOR_EQUAL_TO = 1 |
The '=' comparison operator.
Definition at line 34 of file QueryInterface.php.
Referenced by Query\equals(), Comparison\getOperator(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_EQUAL_TO_NULL = 101 |
For NULL we have to use 'IS' instead of '='
Definition at line 41 of file QueryInterface.php.
Referenced by Comparison\getOperator(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_GREATER_THAN = 5 |
The '>' comparison operator.
Definition at line 76 of file QueryInterface.php.
Referenced by Query\greaterThan(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_GREATER_THAN_OR_EQUAL_TO = 6 |
The '>=' comparison operator.
Definition at line 83 of file QueryInterface.php.
Referenced by Query\greaterThanOrEqual(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_IN = 9 |
The 'in' comparison operator.
Definition at line 104 of file QueryInterface.php.
Referenced by Query\in(), Typo3DbQueryParser\parseComparison(), Typo3DbQueryParser\preparseComparison(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_IS_EMPTY = 11 |
The 'is empty' comparison operator for collections.
Definition at line 118 of file QueryInterface.php.
const OPERATOR_IS_NULL = 10 |
The 'is NULL' comparison operator.
Definition at line 111 of file QueryInterface.php.
const OPERATOR_LESS_THAN = 3 |
The '<' comparison operator.
Definition at line 62 of file QueryInterface.php.
Referenced by Query\lessThan(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_LESS_THAN_OR_EQUAL_TO = 4 |
The '<=' comparison operator.
Definition at line 69 of file QueryInterface.php.
Referenced by Query\lessThanOrEqual(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_LIKE = 7 |
The 'like' comparison operator.
Definition at line 90 of file QueryInterface.php.
Referenced by Query\like(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_NOT_EQUAL_TO = 2 |
The '!=' comparison operator.
Definition at line 48 of file QueryInterface.php.
Referenced by Comparison\getOperator(), and Typo3DbQueryParser\resolveOperator().
const OPERATOR_NOT_EQUAL_TO_NULL = 202 |
For NULL we have to use 'IS NOT' instead of '!='
Definition at line 55 of file QueryInterface.php.
Referenced by Comparison\getOperator(), and Typo3DbQueryParser\resolveOperator().
const ORDER_ASCENDING = 'ASC' |
Constants representing the direction when ordering result sets.
Definition at line 123 of file QueryInterface.php.
Referenced by QueryObjectModelFactory\ascending(), and Typo3DbQueryParser\parseOrderings().
const ORDER_DESCENDING = 'DESC' |
Definition at line 124 of file QueryInterface.php.
Referenced by QueryObjectModelFactory\descending(), and Typo3DbQueryParser\parseOrderings().