|
| buildConditions () |
| Uses the primary key list and the maximal result row from the previous iteration to build an SQL condition sufficient for selecting the next page of results. More...
|
|
| buildGreaterThanCondition (array $quotedMaximumValues) |
| Given an array of column names and their maximum value generate an SQL condition where all keys except the last match $quotedMaximumValues exactly and the last column is greater than the matching value in $quotedMaximumValues. More...
|
|
Definition at line 26 of file BatchRowIterator.php.
BatchRowIterator::__construct |
( |
IDatabase |
$db, |
|
|
|
$table, |
|
|
|
$primaryKey, |
|
|
|
$batchSize |
|
) |
| |
- Parameters
-
IDatabase | $db | The database to read from |
string | array | $table | The name or names of the table to read from |
string | array | $primaryKey | The name or names of the primary key columns |
integer | $batchSize | The number of rows to fetch per iteration |
- Exceptions
-
Definition at line 87 of file BatchRowIterator.php.
References $batchSize, $db, $primaryKey, $table, array(), and table.
BatchRowIterator::addConditions |
( |
array |
$conditions | ) |
|
BatchRowIterator::addJoinConditions |
( |
array |
$conditions | ) |
|
BatchRowIterator::buildConditions |
( |
| ) |
|
|
protected |
Uses the primary key list and the maximal result row from the previous iteration to build an SQL condition sufficient for selecting the next page of results.
All except the final key use =
conditions while the final key uses a >
condition
Example output: array( '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' )
- Returns
- array The SQL conditions necessary to select the next set of rows in the batched query
Definition at line 225 of file BatchRowIterator.php.
References $name, and as.
BatchRowIterator::buildGreaterThanCondition |
( |
array |
$quotedMaximumValues | ) |
|
|
protected |
Given an array of column names and their maximum value generate an SQL condition where all keys except the last match $quotedMaximumValues exactly and the last column is greater than the matching value in $quotedMaximumValues.
- Parameters
-
array | $quotedMaximumValues | The maximum values quoted with $this->db->addQuotes() |
- Returns
- string An SQL condition that will select rows where all columns match the maximum value exactly except the last column which must be greater than the provided maximum value
Definition at line 268 of file BatchRowIterator.php.
References $keys, $value, and as.
BatchRowIterator::current |
( |
| ) |
|
- Returns
- array The most recently fetched set of rows from the database
Definition at line 149 of file BatchRowIterator.php.
BatchRowIterator::extractPrimaryKeys |
( |
|
$row | ) |
|
Extracts the primary key(s) from a database row.
- Parameters
-
stdClass | $row | An individual database row from this iterator |
- Returns
- array Map of primary key column to value within the row
Definition at line 137 of file BatchRowIterator.php.
References $name, and as.
BatchRowIterator::getChildren |
( |
| ) |
|
BatchRowIterator::hasChildren |
( |
| ) |
|
BatchRowIterator::next |
( |
| ) |
|
BatchRowIterator::rewind |
( |
| ) |
|
BatchRowIterator::setFetchColumns |
( |
array |
$columns | ) |
|
BatchRowIterator::valid |
( |
| ) |
|
BatchRowIterator::$batchSize |
|
protected |
BatchRowIterator::$conditions = [] |
|
protected |
BatchRowIterator::$current = [] |
|
private |
BatchRowIterator::$fetchColumns |
|
protected |
array BatchRowIterator::$joinConditions = [] |
|
protected |
integer BatchRowIterator::$key |
|
private |
BatchRowIterator::$orderBy |
|
protected |
BatchRowIterator::$primaryKey |
|
protected |
The documentation for this class was generated from the following file: