$_query
$_query : \Cake\ORM\Query
Original query from where results were generated
Represents the results obtained after executing a query for a specific table This object is responsible for correctly nesting result keys reported from the query, casting each field to the correct type and executing the extra queries required for eager loading external associations.
$_query : \Cake\ORM\Query
Original query from where results were generated
$_statement : \Cake\Database\StatementInterface
Database statement holding the results
None found |
None found |
$_defaultTable : \Cake\ORM\Table|\Cake\Datasource\RepositoryInterface
Default table instance
None found |
$_matchingMap : array
List of associations that should be placed under the `_matchingData` result key.
None found |
None found |
$_map : array
Map of fields that are fetched from the statement with their type and the table they belong to
None found |
$_matchingMapColumns : array
List of matching associations and the column keys to expect from each of them.
None found |
$_results : array|\ArrayAccess
Results that have been fetched or hydrated into the results.
None found |
None found |
$_autoFields : boolean
Tracks value of $_autoFields property of $query passed to constructor.
None found |
$_entityClass : string
The fully namespaced name of the class to use for hydrating results
None found |
$_useBuffering : boolean
Whether or not to buffer results fetched from the statement
None found |
None found |
$_types : array
Type cache for type converters.
Converters are indexed by alias and column name.
None found |
$_driver : \Cake\Database\Driver
The Database driver object.
Cached in a property to avoid multiple calls to the same function.
None found |
None found |
filter(callable $c = null) : \Cake\Collection\Iterator\FilterIterator
{@inheritDoc}
callable | $c |
None found |
reject(callable $c) : \Cake\Collection\Iterator\FilterIterator
{@inheritDoc}
callable | $c |
None found |
None found |
None found |
None found |
map(callable $c) : \Cake\Collection\Iterator\ReplaceIterator
{@inheritDoc}
callable | $c |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
sortBy( $callback, $dir = \SORT_DESC, $type = \SORT_NUMERIC)
{@inheritDoc}
$callback | ||
$dir | ||
$type |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
None found |
first() : array|object
Get the first record from a result set.
This method will also close the underlying statement cursor.
None found |
None found |
None found |
None found |
None found |
None found |
None found |
combine( $keyPath, $valuePath, $groupPath = null)
{@inheritDoc}
$keyPath | ||
$valuePath | ||
$groupPath |
None found |
nest( $idPath, $parentPath, $nestingKey = 'children')
{@inheritDoc}
$idPath | ||
$parentPath | ||
$nestingKey |
None found |
insert( $path, $values) : \Cake\Collection\Iterator\InsertIterator
{@inheritDoc}
$path | ||
$values |
None found |
None found |
None found |
None found |
None found |
None found |
buffered() : \Cake\Collection\Iterator\BufferedIterator
{@inheritDoc}
None found |
listNested( $dir = 'desc', $nestingKey = 'children') : \Cake\Collection\Iterator\TreeIterator
{@inheritDoc}
$dir | ||
$nestingKey |
None found |
stopWhen( $condition) : \Cake\Collection\Iterator\StoppableIterator
{@inheritDoc}
$condition |
None found |
None found |
None found |
None found |
None found |
None found |
chunkWithKeys( $chunkSize, $preserveKeys = true)
{@inheritDoc}
$chunkSize | ||
$preserveKeys |
None found |
None found |
None found |
None found |
cartesianProduct(callable|null $operation = null, callable|null $filter = null) : \Cake\Collection\CollectionInterface
callable|null | $operation | Operation |
callable|null | $filter | Filter |
None found |
transpose() : \Cake\Collection\CollectionInterface
{@inheritDoc}
None found |
count() : integer
Gives the number of rows in the result set.
Part of the Countable interface.
None found |
None found |
__construct(\Cake\ORM\Query $query, \Cake\Database\StatementInterface $statement)
Constructor
\Cake\ORM\Query | $query | Query from where results come |
\Cake\Database\StatementInterface | $statement | The statement to fetch from |
None found |
current() : array|object
Returns the current record in the result iterator
Part of Iterator interface.
None found |
key() : integer
Returns the key of the current record in the iterator
Part of Iterator interface.
None found |
None found |
rewind() : void
Rewinds a ResultSet.
Part of Iterator interface.
None found |
valid() : boolean
Whether there are more results to be fetched from the iterator
Part of Iterator interface.
None found |
serialize() : string
Serializes a resultset.
Part of Serializable interface.
Serialized object
None found |
unserialize(string $serialized) : void
Unserializes a resultset.
Part of Serializable interface.
string | $serialized | Serialized object |
None found |
__debugInfo() : array
Returns an array that can be used to describe the internal state of this object.
None found |
optimizeUnwrap() : \Traversable|array
Unwraps this iterator and returns the simplest traversable that can be used for getting the data out
None found |
_calculateAssociationMap(\Cake\ORM\Query $query) : void
Calculates the list of associations that should get eager loaded when fetching each record
\Cake\ORM\Query | $query | The query from where to derive the associations |
None found |
_calculateColumnMap(\Cake\ORM\Query $query) : void
Creates a map of row keys out of the query select clause that can be used to hydrate nested result sets more quickly.
\Cake\ORM\Query | $query | The query from where to derive the column map |
None found |
_calculateTypeMap() : void
Creates a map of Type converter classes for each of the columns that should be fetched by this object.
None found |
_getTypes(\Cake\ORM\Table $table, array $fields) : array
Returns the Type classes for each of the passed fields belonging to the table.
\Cake\ORM\Table | $table | The table from which to get the schema |
array | $fields | The fields whitelist to use for fields in the schema. |
None found |
_fetchResult() : mixed
Helper function to fetch the next result from the statement or seeded results.
None found |
_groupResult(array $row) : array
Correctly nests results keys including those coming from associations
array | $row | Array containing columns and values or false if there is no results |
Results
None found |
_castValues(string $alias, array $values) : array
Casts all values from a row brought from a table to the correct PHP type.
string | $alias | The table object alias |
array | $values | The values to cast |
None found |