Framework
3.9
|
IteratedQuery provides a memory-efficient way to query and return large data sets. More...
Public Member Functions | |
__construct ($class, $constraints="") | |
_runQuery () | |
execute () | |
Public Member Functions inherited from AbstractQuery | |
constraints ($constraints) | |
Sets the constraint clause for the Query. More... | |
filter ($filter) | |
Sets a filter to constrain the fields retrieved when the query is executed. More... | |
params ($params) | |
Sets the bound parameters array. More... | |
bind () | |
Binds placeholders to parameter values. More... | |
Static Public Member Functions | |
static | create ($class, $constraints="") |
Additional Inherited Members | |
Public Attributes inherited from AbstractQuery | |
$class | |
$constraints | |
$filter | |
$params | |
IteratedQuery provides a memory-efficient way to query and return large data sets.
Whereas the default Query class and the IndexedQuery and GroupedQuery classes all pull the full result set into memory when the query is executed, IteratedQuery leaves the connection to the database open and retrieves the results one row at a time. The results are returned wrapped in a DataItemIterator, allowing them to be used in foreach(...) statements, etc.
In general it is recommended that IteratedQuery only be used in situations where the result would take up too much memory to be processed using a standard Query object.
Definition at line 163 of file iterated_query.inc.
IteratedQuery::__construct | ( | $class, | |
$constraints = "" |
|||
) |
IteratedQuery::_runQuery | ( | ) |
Definition at line 170 of file iterated_query.inc.
|
static |
Definition at line 212 of file iterated_query.inc.
IteratedQuery::execute | ( | ) |
Reimplemented from AbstractQuery.
Definition at line 207 of file iterated_query.inc.