Ferreteria/v0.3/class/tSequentialAccess
< Ferreteria | v0.3 | class
Jump to navigation
Jump to search
/*tttt
PURPOSE: for enabling sequential access to multiple rows of data
Does not implement a method of storing the data.
*/
trait tSequentialAccess {
// ACTION: sets the row pointer to just before the first row
abstract public function RewindRows();
// RETURNS: number of rows in the resultset
abstract public function GetFoundRowCount();
public function IsRowFound() { return ($this->GetFoundRowCount() > 0); }
/*----
ACTION: Retrieves the current row data and advances to the next
RETURNS: row data as an array, or NULL if no more rows
*/
abstract public function NextRow(); // load the next row from the source into the fields
/*----
ACTION: For each record in the current record source, the field values
are added to an array which is keyed by the given field.
INPUT: $sField = name of field to use as the array key
RETURNS: keyed array of field objects
array[key][field name] = field object
*/
public function FetchRows_asFieldArray($sField) {
// ASSUMES: all rows have the same columns
public function DumpRows() {
}