![]() |
Xataface
2.0alpha2
Xataface Application Framework
|
A class for reading records from the database. More...
Public Member Functions | |
| __construct ($sql, $db, $bufferSize=30, $decorator=null) | |
| Creates a new record reader. | |
| __destruct () | |
| Destructor. Frees memory. | |
| rewind () | |
| Rewinds the pointer to the beginning of the found set. | |
| getQuery ($start, $limit) | |
| current () | |
| Returns the current record. | |
| key () | |
| Returns the index of the current position. | |
| next () | |
| Increments the current position to the next position. | |
| valid () | |
| Checks to see if the current position is valid. | |
A class for reading records from the database.
$query = "select * from people"; $reader = new Dataface_ResultReader($query, $db); foreach ($reader as $key=>$person){ // do something with $person Dataface_Record object. }
June 26, 2012
Definition at line 23 of file ResultReader.php.
| __construct | ( | $sql, | |
| $db, | |||
$bufferSize = 30, |
|||
$decorator = null |
|||
| ) |
Creates a new record reader.
| string | $sql | The SQL query for the set to retrieve. |
| resource | $db | The database resource connection. |
| int | $bufferSize | The size of the buffer. |
Definition at line 79 of file ResultReader.php.
| __destruct | ( | ) |
Destructor. Frees memory.
Definition at line 106 of file ResultReader.php.
| current | ( | ) |
Returns the current record.
Definition at line 175 of file ResultReader.php.
| getQuery | ( | $start, | |
| $limit | |||
| ) |
Definition at line 132 of file ResultReader.php.
| key | ( | ) |
Returns the index of the current position.
Definition at line 184 of file ResultReader.php.
| next | ( | ) |
Increments the current position to the next position.
Definition at line 191 of file ResultReader.php.
| rewind | ( | ) |
Rewinds the pointer to the beginning of the found set.
Definition at line 114 of file ResultReader.php.
| valid | ( | ) |
Checks to see if the current position is valid.
Definition at line 198 of file ResultReader.php.
1.8.1.2