‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Persistence\Generic\Query Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\Query:
TYPO3\CMS\Extbase\Persistence\QueryInterface

Public Member Functions

 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectDataMapFactory (DataMapFactory $dataMapFactory)
 
 injectPersistenceManager (PersistenceManagerInterface $persistenceManager)
 
 injectQomFactory (QueryObjectModelFactory $qomFactory)
 
 __construct ($type)
 
QueryInterface getParentQuery ()
 
 setParentQuery (?QueryInterface $parentQuery)
 
 setQuerySettings (QuerySettingsInterface $querySettings)
 
QuerySettingsInterface getQuerySettings ()
 
string getType ()
 
 setSource (SourceInterface $source)
 
TYPO3 CMS Extbase Persistence Generic Qom SourceInterface getSource ()
 
TYPO3 CMS Extbase Persistence QueryResultInterface array execute ($returnRawQueryResult=false)
 
QueryInterface setOrderings (array $orderings)
 
int getOrderings ()
 
QueryInterface setLimit ($limit)
 
QueryInterface unsetLimit ()
 
int getLimit ()
 
QueryInterface setOffset ($offset)
 
int getOffset ()
 
QueryInterface matching ($constraint)
 
QueryInterface statement ($statement, array $parameters=[])
 
TYPO3 CMS Extbase Persistence Generic Qom Statement getStatement ()
 
TYPO3 CMS Extbase Persistence Generic Qom ConstraintInterface null getConstraint ()
 
TYPO3 CMS Extbase Persistence Generic Qom AndInterface logicalAnd ($constraint1, $constraint2=null,... $furtherConstraints)
 
TYPO3 CMS Extbase Persistence Generic Qom OrInterface logicalOr ($constraint1, $constraint2=null,... $furtherConstraints)
 
TYPO3 CMS Extbase Persistence Generic Qom NotInterface logicalNot (ConstraintInterface $constraint)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface equals ($propertyName, $operand, $caseSensitive=true)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface like ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface contains ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface in ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface lessThan ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface lessThanOrEqual ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface greaterThan ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface greaterThanOrEqual ($propertyName, $operand)
 
TYPO3 CMS Extbase Persistence Generic Qom AndInterface between ($propertyName, $operandLower, $operandUpper)
 
 __wakeup ()
 
array __sleep ()
 
int count ()
 
 isEmpty ($propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\QueryInterface
AndInterface logicalAnd ($constraint1)
 
OrInterface logicalOr ($constraint1)
 

Public Attributes

const JCR_JOIN_TYPE_INNER = '{http://www.jcp.org/jcr/1.0}joinTypeInner'
 
const JCR_JOIN_TYPE_LEFT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeLeftOuter'
 
const JCR_JOIN_TYPE_RIGHT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeRightOuter'
 
const CHARSET = 'utf-8'
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Extbase\Persistence\QueryInterface
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'
 

Protected Member Functions

string getSelectorName ()
 

Protected Attributes

string $type
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Persistence Generic Mapper DataMapFactory $dataMapFactory
 
TYPO3 CMS Extbase Persistence PersistenceManagerInterface $persistenceManager
 
TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory $qomFactory
 
TYPO3 CMS Extbase Persistence Generic Qom SourceInterface $source
 
TYPO3 CMS Extbase Persistence Generic Qom ConstraintInterface $constraint
 
TYPO3 CMS Extbase Persistence Generic Qom Statement $statement
 
int[] $orderings = array( )
 
int $limit
 
int $offset
 
QuerySettingsInterface $querySettings
 
QueryInterface null $parentQuery
 

Detailed Description

The Query class used to run queries against the database

Definition at line 37 of file Query.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\Query::__construct (   $type)

Constructs a query object working on the given class name

Parameters
string$type

Definition at line 151 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$type.

Member Function Documentation

◆ __sleep()

array TYPO3\CMS\Extbase\Persistence\Generic\Query::__sleep ( )
Returns
‪array

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 656 of file Query.php.

◆ __wakeup()

TYPO3\CMS\Extbase\Persistence\Generic\Query::__wakeup ( )

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 644 of file Query.php.

◆ between()

TYPO3 CMS Extbase Persistence Generic Qom AndInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::between (   $propertyName,
  $operandLower,
  $operandUpper 
)

Returns a greater than or equal criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operandLower‪The value of the lower boundary to compare against
mixed$operandUpper‪The value of the upper boundary to compare against
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\AndInterface
Exceptions

Definition at line 633 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\greaterThanOrEqual(), TYPO3\CMS\Extbase\Persistence\Generic\Query\lessThanOrEqual(), and TYPO3\CMS\Extbase\Persistence\Generic\Query\logicalAnd().

◆ contains()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::contains (   $propertyName,
  $operand 
)

Returns a "contains" criterion used for matching objects against a query. It matches if the multivalued property contains the given operand.

Parameters
string$propertyName‪The name of the (multivalued) property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 554 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_CONTAINS.

◆ count()

int TYPO3\CMS\Extbase\Persistence\Generic\Query::count ( )

Returns the query result count.

Returns
‪int The query result count

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 666 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\execute().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\logicalAnd(), and TYPO3\CMS\Extbase\Persistence\Generic\Query\logicalOr().

◆ equals()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::equals (   $propertyName,
  $operand,
  $caseSensitive = true 
)

Returns an equals criterion used for matching objects against a query

Parameters
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
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 512 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\CHARSET, and TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_EQUAL_TO.

◆ execute()

TYPO3 CMS Extbase Persistence QueryResultInterface array TYPO3\CMS\Extbase\Persistence\Generic\Query::execute (   $returnRawQueryResult = false)

Executes the query against the database and returns the result

Parameters
bool$returnRawQueryResult‪avoids the object mapping by the persistence
Returns
‪\TYPO3\CMS\Extbase\Persistence\QueryResultInterface|array The query result object or an array if $returnRawQueryResult is TRUE

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 253 of file Query.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\count().

◆ getConstraint()

TYPO3 CMS Extbase Persistence Generic Qom ConstraintInterface null TYPO3\CMS\Extbase\Persistence\Generic\Query::getConstraint ( )

Gets the constraint for this query.

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface|null the constraint, or null if none

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 400 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$constraint.

◆ getLimit()

int TYPO3\CMS\Extbase\Persistence\Generic\Query::getLimit ( )

Returns the maximum size of the result set to limit.

Returns
‪int

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 326 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$limit.

◆ getOffset()

int TYPO3\CMS\Extbase\Persistence\Generic\Query::getOffset ( )

Returns the start offset of the result set.

Returns
‪int

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 353 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$offset.

◆ getOrderings()

int TYPO3\CMS\Extbase\Persistence\Generic\Query::getOrderings ( )

Returns the property names to order the result by. Like this: array( 'foo' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING, 'bar' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING )

Returns
‪int

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 287 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$orderings.

◆ getParentQuery()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::getParentQuery ( )
Returns
‪?QueryInterface

Definition at line 160 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$parentQuery.

◆ getQuerySettings()

QuerySettingsInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::getQuerySettings ( )

Returns the Query Settings.

Exceptions
Exception
Returns
QuerySettingsInterface $querySettings The Query Settings

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 191 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$querySettings.

◆ getSelectorName()

string TYPO3\CMS\Extbase\Persistence\Generic\Query::getSelectorName ( )
protected

Returns the selector's name or an empty string, if the source is not a selector

Todo:
‪This has to be checked at another place
Returns
‪string The selector name

Definition at line 225 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$source, and TYPO3\CMS\Extbase\Persistence\Generic\Query\getSource().

◆ getSource()

TYPO3 CMS Extbase Persistence Generic Qom SourceInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::getSource ( )

Gets the node-tuple source for this query.

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface the node-tuple source; non-null

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 239 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$source, and TYPO3\CMS\Extbase\Persistence\Generic\Query\getType().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\getSelectorName().

◆ getStatement()

TYPO3 CMS Extbase Persistence Generic Qom Statement TYPO3\CMS\Extbase\Persistence\Generic\Query::getStatement ( )

Returns the statement of this query.

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 390 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$statement.

◆ getType()

string TYPO3\CMS\Extbase\Persistence\Generic\Query::getType ( )

Returns the type this query cares for.

Returns
‪string

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 204 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$type.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\getSource().

◆ greaterThan()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::greaterThan (   $propertyName,
  $operand 
)

Returns a greater than criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 607 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_GREATER_THAN.

◆ greaterThanOrEqual()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::greaterThanOrEqual (   $propertyName,
  $operand 
)

Returns a greater than or equal criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 619 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_GREATER_THAN_OR_EQUAL_TO.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\between().

◆ in()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\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.

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with, multivalued
Exceptions
Exception

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 568 of file Query.php.

References TYPO3\CMS\Extbase\Utility\TypeHandlingUtility\isValidTypeForMultiValueComparison(), and TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_IN.

◆ injectDataMapFactory()

TYPO3\CMS\Extbase\Persistence\Generic\Query::injectDataMapFactory ( DataMapFactory  $dataMapFactory)
Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory$dataMapFactory

Definition at line 125 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$dataMapFactory.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Persistence\Generic\Query::injectObjectManager ( ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 117 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$objectManager.

◆ injectPersistenceManager()

TYPO3\CMS\Extbase\Persistence\Generic\Query::injectPersistenceManager ( PersistenceManagerInterface  $persistenceManager)
Parameters
\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface$persistenceManager

Definition at line 133 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$persistenceManager.

◆ injectQomFactory()

TYPO3\CMS\Extbase\Persistence\Generic\Query::injectQomFactory ( QueryObjectModelFactory  $qomFactory)

◆ isEmpty()

TYPO3\CMS\Extbase\Persistence\Generic\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.

Parameters
string$propertyName‪The name of the multivalued property to compare against
Exceptions
Exception

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 678 of file Query.php.

◆ lessThan()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::lessThan (   $propertyName,
  $operand 
)

Returns a less than criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 583 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_LESS_THAN.

◆ lessThanOrEqual()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::lessThanOrEqual (   $propertyName,
  $operand 
)

Returns a less or equal than criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 595 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_LESS_THAN_OR_EQUAL_TO.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\between().

◆ like()

TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::like (   $propertyName,
  $operand 
)

Returns a like criterion used for matching objects against a query

Parameters
string$propertyName‪The name of the property to compare against
mixed$operand‪The value to compare with
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 537 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\QueryInterface\OPERATOR_LIKE.

◆ logicalAnd()

TYPO3 CMS Extbase Persistence Generic Qom AndInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::logicalAnd (   $constraint1,
  $constraint2 = null,
  $furtherConstraints 
)

Performs a logical conjunction of the 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.

Parameters
ConstraintInterface$constraint1‪First constraint
ConstraintInterface$constraint2‪Second constraint
ConstraintInterface‪...$furtherConstraints Further constraints
Exceptions
Exception

Definition at line 415 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$constraint, and TYPO3\CMS\Extbase\Persistence\Generic\Query\count().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\between().

◆ logicalNot()

TYPO3 CMS Extbase Persistence Generic Qom NotInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::logicalNot ( ConstraintInterface  $constraint)

Performs a logical negation of the given constraint

Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface$constraint‪Constraint to negate
Exceptions

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 499 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$constraint.

◆ logicalOr()

TYPO3 CMS Extbase Persistence Generic Qom OrInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::logicalOr (   $constraint1,
  $constraint2 = null,
  $furtherConstraints 
)

Performs a logical disjunction of the two given constraints

Parameters
ConstraintInterface$constraint1‪First constraint
ConstraintInterface$constraint2‪Second constraint
ConstraintInterface‪...$furtherConstraints Further constraints
Exceptions
Exception

Definition at line 458 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$constraint, and TYPO3\CMS\Extbase\Persistence\Generic\Query\count().

◆ matching()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::matching (   $constraint)

The constraint used to limit the result set. Returns $this to allow for chaining (fluid interface)

Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface$constraint
Returns
QueryInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 365 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$constraint.

◆ setLimit()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::setLimit (   $limit)

Sets the maximum size of the result set to limit. Returns $this to allow for chaining (fluid interface)

Parameters
int$limit
Exceptions

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 300 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$limit.

◆ setOffset()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::setOffset (   $offset)

Sets the start offset of the result set to offset. Returns $this to allow for chaining (fluid interface)

Parameters
int$offset
Exceptions

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 339 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$offset.

◆ setOrderings()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::setOrderings ( array  $orderings)

Sets the property names to order the result by. Expected like this: array( 'foo' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING, 'bar' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING ) where 'foo' and 'bar' are property names.

Parameters
array$orderings‪The property names to order by
Returns
QueryInterface

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 272 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$orderings.

◆ setParentQuery()

TYPO3\CMS\Extbase\Persistence\Generic\Query::setParentQuery ( ?QueryInterface  $parentQuery)
Parameters
?QueryInterface‪$parentQuery

Definition at line 169 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$parentQuery.

◆ setQuerySettings()

TYPO3\CMS\Extbase\Persistence\Generic\Query::setQuerySettings ( QuerySettingsInterface  $querySettings)

Sets the Query Settings. These Query settings must match the settings expected by the specific Storage Backend.

Parameters
QuerySettingsInterface$querySettings‪The Query Settings

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 180 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$querySettings.

◆ setSource()

TYPO3\CMS\Extbase\Persistence\Generic\Query::setSource ( SourceInterface  $source)

Sets the source to fetch the result from

Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface$source

Implements TYPO3\CMS\Extbase\Persistence\QueryInterface.

Definition at line 214 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$source.

◆ statement()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::statement (   $statement,
array  $parameters = [] 
)

Sets the statement of this query. If you use this, you will lose the abstraction from a concrete storage backend (database).

Parameters
string | \TYPO3\CMS\Core\Database\Query\QueryBuilder | \Doctrine\DBAL\Statement$statement‪The statement
array$parameters‪An array of parameters. These will be bound to placeholders '?' in the $statement.
Returns
QueryInterface

Definition at line 379 of file Query.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Query\$statement.

◆ unsetLimit()

QueryInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::unsetLimit ( )

Resets a previously set maximum size of the result set. Returns $this to allow for chaining (fluid interface)

Returns
QueryInterface

Definition at line 315 of file Query.php.

Member Data Documentation

◆ $constraint

◆ $dataMapFactory

TYPO3 CMS Extbase Persistence Generic Mapper DataMapFactory TYPO3\CMS\Extbase\Persistence\Generic\Query::$dataMapFactory
protected

◆ $limit

int TYPO3\CMS\Extbase\Persistence\Generic\Query::$limit
protected

◆ $objectManager

TYPO3 CMS Extbase Object ObjectManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::$objectManager
protected

◆ $offset

int TYPO3\CMS\Extbase\Persistence\Generic\Query::$offset
protected

◆ $orderings

int [] TYPO3\CMS\Extbase\Persistence\Generic\Query::$orderings = array( )
protected

◆ $parentQuery

QueryInterface null TYPO3\CMS\Extbase\Persistence\Generic\Query::$parentQuery
protected

◆ $persistenceManager

TYPO3 CMS Extbase Persistence PersistenceManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::$persistenceManager
protected

◆ $qomFactory

TYPO3 CMS Extbase Persistence Generic Qom QueryObjectModelFactory TYPO3\CMS\Extbase\Persistence\Generic\Query::$qomFactory
protected

◆ $querySettings

QuerySettingsInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::$querySettings
protected

◆ $source

TYPO3 CMS Extbase Persistence Generic Qom SourceInterface TYPO3\CMS\Extbase\Persistence\Generic\Query::$source
protected

◆ $statement

TYPO3 CMS Extbase Persistence Generic Qom Statement TYPO3\CMS\Extbase\Persistence\Generic\Query::$statement
protected

◆ $type

string TYPO3\CMS\Extbase\Persistence\Generic\Query::$type
protected

◆ CHARSET

const TYPO3\CMS\Extbase\Persistence\Generic\Query::CHARSET = 'utf-8'

Charset of strings in QOM

Definition at line 57 of file Query.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\equals().

◆ JCR_JOIN_TYPE_INNER

const TYPO3\CMS\Extbase\Persistence\Generic\Query::JCR_JOIN_TYPE_INNER = '{http://www.jcp.org/jcr/1.0}joinTypeInner'

An inner join.

Definition at line 42 of file Query.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper\getSource().

◆ JCR_JOIN_TYPE_LEFT_OUTER

const TYPO3\CMS\Extbase\Persistence\Generic\Query::JCR_JOIN_TYPE_LEFT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeLeftOuter'

A left-outer join.

Definition at line 47 of file Query.php.

◆ JCR_JOIN_TYPE_RIGHT_OUTER

const TYPO3\CMS\Extbase\Persistence\Generic\Query::JCR_JOIN_TYPE_RIGHT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeRightOuter'

A right-outer join.

Definition at line 52 of file Query.php.