AbstractReader
class AbstractReader implements IteratorAggregate (View source)
Class DatabaseReader
Methods
execute
getIterator
Method to get the first field of the first row of the result set from the database query.
Method to get an array of values from the $offset field in each row of the result set from the database query.
Method to get the first row of the result set from the database query as an array. Columns are indexed numerically so the first column in the result set would be accessible via $row[0], etc.
Method to get an array of the result set rows from the database query where each row is an array. The array of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.
Method to get the first row of the result set from the database query as an associative array of ['field' => 'value'].
Method to get an array of the result set rows from the database query where each row is an associative array of ['fieldname' => 'rowvalue']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.
Method to get the first row of the result set from the database query as an object.
Method to get an array of the result set rows from the database query where each row is an object. The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.
count
Method to fetch a row from the result set cursor as an array.
Method to fetch a row from the result set cursor as an associative array.
Method to fetch a row from the result set cursor as an object.
Get the number of affected rows for the previous executed SQL statement.
Method to get the auto-incremented value from the last INSERT statement.
freeResult
Method to get property Db
Method to get property Cursor
Method to set property cursor
Details
at line line 41
__construct(AbstractDatabaseDriver $db)
Constructor.
at line line 65
AbstractReader
execute()
execute
at line line 84
DataIterator
getIterator()
getIterator
at line line 99
mixed
loadResult()
Method to get the first field of the first row of the result set from the database query.
at line line 126
mixed
loadColumn(integer $offset)
Method to get an array of values from the $offset field in each row of the result set from the database query.
at line line 151
mixed
loadArray()
Method to get the first row of the result set from the database query as an array. Columns are indexed numerically so the first column in the result set would be accessible via $row[0], etc.
at line line 176
mixed
loadArrayList(string $key = null)
Method to get an array of the result set rows from the database query where each row is an array. The array of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.
NOTE: Choosing to key the result array by a non-unique field can result in unwanted behavior and should be avoided.
at line line 208
mixed
loadAssoc()
Method to get the first row of the result set from the database query as an associative array of ['field' => 'value'].
at line line 231
mixed
loadAssocList(string $key = null)
Method to get an array of the result set rows from the database query where each row is an associative array of ['fieldname' => 'rowvalue']. The array of rows can optionally be keyed by a field name, but defaults to a sequential numeric array.
at line line 264
mixed
loadObject(string $class = 'stdClass')
Method to get the first row of the result set from the database query as an object.
at line line 292
mixed
loadObjectList(string $key = null, string $class = 'stdClass')
Method to get an array of the result set rows from the database query where each row is an object. The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.
NOTE: Choosing to key the result array by a non-unique field name can result in unwanted behavior and should be avoided.
at line line 324
abstract mixed
count(resource $cursor = null)
count
at line line 333
abstract mixed
fetchArray()
Method to fetch a row from the result set cursor as an array.
at line line 342
abstract mixed
fetchAssoc()
Method to fetch a row from the result set cursor as an associative array.
at line line 353
abstract mixed
fetchObject(string $class = '\\stdClass')
Method to fetch a row from the result set cursor as an object.
at line line 365
abstract int
countAffected(resource $cursor = null)
Get the number of affected rows for the previous executed SQL statement.
Only applicable for DELETE, INSERT, or UPDATE statements.
at line line 374
abstract string
insertId()
Method to get the auto-incremented value from the last INSERT statement.
at line line 381
$this
freeResult()
freeResult
at line line 393
AbstractDatabaseDriver
getDriver()
Method to get property Db
at line line 405
AbstractReader
setDriver(AbstractDatabaseDriver $db)
Method to set property db
at line line 417
resource
getCursor()
Method to get property Cursor
at line line 429
AbstractReader
setCursor(resource $cursor)
Method to set property cursor