‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Persistence\QueryInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\QueryInterface:
TYPO3\CMS\Extbase\Persistence\Generic\Query

Public Member Functions

TYPO3 CMS Extbase Persistence Generic Qom SourceInterface getSource ()
 
TYPO3 CMS Extbase Persistence QueryResultInterface array execute ($returnRawQueryResult=false)
 
TYPO3 CMS Extbase Persistence QueryInterface setOrderings (array $orderings)
 
TYPO3 CMS Extbase Persistence QueryInterface setLimit ($limit)
 
TYPO3 CMS Extbase Persistence QueryInterface setOffset ($offset)
 
TYPO3 CMS Extbase Persistence QueryInterface matching ($constraint)
 
AndInterface logicalAnd ($constraint1)
 
OrInterface logicalOr ($constraint1)
 
TYPO3 CMS Extbase Persistence Generic Qom NotInterface logicalNot (ConstraintInterface $constraint)
 
TYPO3 CMS Extbase Persistence Generic Qom ComparisonInterface equals ($propertyName, $operand, $caseSensitive=true)
 
ComparisonInterface like ($propertyName, $operand)
 
ComparisonInterface contains ($propertyName, $operand)
 
ComparisonInterface in ($propertyName, $operand)
 
ComparisonInterface lessThan ($propertyName, $operand)
 
ComparisonInterface lessThanOrEqual ($propertyName, $operand)
 
ComparisonInterface greaterThan ($propertyName, $operand)
 
ComparisonInterface greaterThanOrEqual ($propertyName, $operand)
 
string getType ()
 
 setQuerySettings (Generic\QuerySettingsInterface $querySettings)
 
TYPO3 CMS Extbase Persistence Generic QuerySettingsInterface getQuerySettings ()
 
int count ()
 
array getOrderings ()
 
int getLimit ()
 
int getOffset ()
 
ConstraintInterface null getConstraint ()
 
bool isEmpty ($propertyName)
 
 setSource (Generic\Qom\SourceInterface $source)
 
TYPO3 CMS Extbase Persistence Generic Qom Statement 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'
 

Detailed Description

A persistence query interface

Definition at line 25 of file QueryInterface.php.

Member Function Documentation

◆ contains()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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!

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

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ count()

int TYPO3\CMS\Extbase\Persistence\QueryInterface::count ( )

Returns the query result count.

Returns
‪int The query result count

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ equals()

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

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

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

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

◆ execute()

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

Executes the query 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

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Persistence\Repository\countAll(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper\countRelated(), TYPO3\CMS\Extbase\Persistence\Repository\findAll(), and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper\getNonEmptyRelationValue().

◆ getConstraint()

ConstraintInterface null TYPO3\CMS\Extbase\Persistence\QueryInterface::getConstraint ( )

◆ getLimit()

int TYPO3\CMS\Extbase\Persistence\QueryInterface::getLimit ( )

◆ getOffset()

int TYPO3\CMS\Extbase\Persistence\QueryInterface::getOffset ( )

◆ getOrderings()

array TYPO3\CMS\Extbase\Persistence\QueryInterface::getOrderings ( )

Gets 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
‪array

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\convertQueryToDoctrineQueryBuilder().

◆ getQuerySettings()

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

◆ getSource()

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

Gets the node-tuple source for this query.

Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface the node-tuple source; non-NULL
Deprecated:
‪since Extbase 6.0, will be removed in Extbase 7.0. It is deprecated only in the interface to be more in sync with Flow in future and will stay in Generic Persistence.

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\convertQueryToDoctrineQueryBuilder(), and TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\getObjectDataByQuery().

◆ getStatement()

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

◆ getType()

string TYPO3\CMS\Extbase\Persistence\QueryInterface::getType ( )

Returns the type this query cares for.

Returns
‪string

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\QueryResult\getFirst().

◆ greaterThan()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ greaterThanOrEqual()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ in()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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
Returns
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

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

◆ isEmpty()

bool TYPO3\CMS\Extbase\Persistence\QueryInterface::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
Returns
‪bool
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ lessThan()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ lessThanOrEqual()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ like()

ComparisonInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::like (   $propertyName,
  $operand 
)

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.

Parameters
string$propertyName‪The name of the property to compare against
string$operand‪The value to compare with
Returns
‪ComparisonInterface
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ logicalAnd()

AndInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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.

Parameters
mixed$constraint1‪The first of multiple constraints or an array of constraints.
Returns
‪AndInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

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

◆ logicalNot()

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

Performs a logical negation of the given constraint

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

◆ logicalOr()

OrInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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.

Parameters
mixed$constraint1‪The first of multiple constraints or an array of constraints.
Returns
‪OrInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

◆ matching()

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

◆ setLimit()

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

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

Parameters
int$limit
Returns
‪\TYPO3\CMS\Extbase\Persistence\QueryInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Tests\Functional\Persistence\RelationTest\applyQueryRequest().

◆ setOffset()

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

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

Parameters
int$offset
Returns
‪\TYPO3\CMS\Extbase\Persistence\QueryInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Tests\Functional\Persistence\RelationTest\applyQueryRequest().

◆ setOrderings()

TYPO3 CMS Extbase Persistence QueryInterface TYPO3\CMS\Extbase\Persistence\QueryInterface::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 )

Parameters
array$orderings‪The property names to order by
Returns
‪\TYPO3\CMS\Extbase\Persistence\QueryInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\Query.

Referenced by TYPO3\CMS\Extbase\Tests\Functional\Persistence\RelationTest\applyQueryRequest(), TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper\getPreparedQuery().

◆ setQuerySettings()

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

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

Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface$querySettings‪The Query Settings
Todo:
‪decide whether this can be deprecated somewhen

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory\create(), and TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ setSource()

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

Sets the source to fetch the result from

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

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

Member Data Documentation

◆ OPERATOR_CONTAINS

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_CONTAINS = 8

The 'contains' comparison operator for collections.

Definition at line 75 of file QueryInterface.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Query\contains(), and TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\parseComparison().

◆ OPERATOR_EQUAL_TO

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_EQUAL_TO = 1

◆ OPERATOR_EQUAL_TO_NULL

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_EQUAL_TO_NULL = 101

◆ OPERATOR_GREATER_THAN

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_GREATER_THAN = 5

◆ OPERATOR_GREATER_THAN_OR_EQUAL_TO

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_GREATER_THAN_OR_EQUAL_TO = 6

◆ OPERATOR_IN

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_IN = 9

◆ OPERATOR_IS_EMPTY

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_IS_EMPTY = 11

The 'is empty' comparison operator for collections.

Definition at line 90 of file QueryInterface.php.

◆ OPERATOR_IS_NULL

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_IS_NULL = 10

The 'is NULL' comparison operator.

Definition at line 85 of file QueryInterface.php.

◆ OPERATOR_LESS_THAN

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_LESS_THAN = 3

◆ OPERATOR_LESS_THAN_OR_EQUAL_TO

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_LESS_THAN_OR_EQUAL_TO = 4

◆ OPERATOR_LIKE

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_LIKE = 7

◆ OPERATOR_NOT_EQUAL_TO

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_NOT_EQUAL_TO = 2

◆ OPERATOR_NOT_EQUAL_TO_NULL

const TYPO3\CMS\Extbase\Persistence\QueryInterface::OPERATOR_NOT_EQUAL_TO_NULL = 202

◆ ORDER_ASCENDING

const TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING = 'ASC'

Constants representing the direction when ordering result sets.

Definition at line 95 of file QueryInterface.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory\ascending(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\OperatorTest\betweenSetsBoundariesCorrectly(), TYPO3\CMS\Extbase\Tests\Unit\Persistence\RepositoryTest\createQuerySetsDefaultOrderingIfDefined(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\RelationTest\distinctDataProvider(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingHiddenPostsReturnsHiddenOverlay(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingHiddenPostsReturnsHiddenOverlay(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingHiddenPostsReturnsHiddenOverlayOverlayEnabled(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingHiddenPostsWithIgnoreEnableField(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingHiddenPostsWithIgnoreEnableField(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingPostByTagName(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingPostByTagName(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingPostsReturnsEnglishPostsWithFallback(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingPostsReturnsEnglishPostsWithFallback(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingPostsReturnsGreekPostsWithFallback(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingPostsReturnsGreekPostsWithFallback(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingPostsReturnsGreekPostsWithHideNonTranslated(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingPostsReturnsGreekPostsWithHideNonTranslated(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingTranslatedPostByBlogTitle(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingTranslatedPostByTagName(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingTranslatedPostByTagName(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\fetchingTranslatedPostByTitle(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\fetchingTranslatedPostByTitle(), ExtbaseTeam\BlogExample\Domain\Repository\PostRepository\findAllSortedByCategory(), TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository\findDemanded(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper\getPreparedQuery(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\orderingByBlogTitle(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationTest\orderingByTitleRespectsEnglishTitles(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\TranslationLegacyTest\orderingByTitleRespectsEnglishTitles(), TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Storage\Typo3DbQueryParserTest\orderStatementGenerationWorks(), TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Storage\Typo3DbQueryParserTest\orderStatementGenerationWorksWithMultipleOrderings(), TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser\parseOrderings(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\QueryLocalizedDataTest\postsWithoutRespectingSysLanguage(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\QueryLocalizedDataLegacyTest\queryFirst5Posts(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\QueryLocalizedDataTest\queryFirst5Posts(), TYPO3\CMS\Extbase\Tests\Functional\Persistence\QueryLocalizedDataLegacyTest\queryPostsByProperty(), and TYPO3\CMS\Extbase\Tests\Functional\Persistence\QueryLocalizedDataTest\queryPostsByProperty().

◆ ORDER_DESCENDING