PHP Class Bravo3\Orm\Services\QueryManager

Inheritance: extends AbstractManagerUtility
显示文件 Open project: bravo3/orm

Public Methods

Method Description
deleteTableQueries ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null ) Persist entity indices
indexedQuery ( IndexedQuery $query, boolean $use_cache = true ) : QueryResult Create a query against a table matching one or more indices
persistTableQueries ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null ) Persist entity indices
sortedQuery ( SortedQuery $query, boolean $check_full_set_size = false, boolean $use_cache = true ) : QueryResult Get all foreign entities ordered by a sort column

Method Details

deleteTableQueries() public method

Persist entity indices
public deleteTableQueries ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null )
$entity object Local entity object
$metadata Bravo3\Orm\Mappers\Metadata\Entity Optionally provide entity metadata to prevent recalculation
$reader Bravo3\Orm\Services\Io\Reader Optionally provide the entity reader
$local_id string Optionally provide the local entity ID to prevent recalculation

indexedQuery() public method

Create a query against a table matching one or more indices
public indexedQuery ( IndexedQuery $query, boolean $use_cache = true ) : QueryResult
$query Bravo3\Orm\Query\IndexedQuery
$use_cache boolean
return Bravo3\Orm\Query\QueryResult

persistTableQueries() public method

Persist entity indices
public persistTableQueries ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null )
$entity object Local entity object
$metadata Bravo3\Orm\Mappers\Metadata\Entity Optionally provide entity metadata to prevent recalculation
$reader Bravo3\Orm\Services\Io\Reader Optionally provide the entity reader
$local_id string Optionally provide the local entity ID to prevent recalculation

sortedQuery() public method

If you have applied a limit to the query but need to know the full size of the unfiltered set, you must set $check_full_set_size to true to gather this information at the expense of a second database query.
public sortedQuery ( SortedQuery $query, boolean $check_full_set_size = false, boolean $use_cache = true ) : QueryResult
$query Bravo3\Orm\Query\SortedQuery
$check_full_set_size boolean
$use_cache boolean
return Bravo3\Orm\Query\QueryResult