SQLite3Query
class SQLite3Query extends SS_Query (View source)
A result-set from a SQLite3 database.
Properties
protected | array | $currentRecord | The current record in the interator. |
from SS_Query |
protected | int | $rowNum | The number of the current row in the interator. |
from SS_Query |
protected | bool | $queryHasBegun | Flag to keep track of whether iteration has begun, to prevent unnecessary seeks |
from SS_Query |
protected | SQLite3Connector | $database | The SQLite3Connector object that created this result set. |
|
protected | SQLite3Result | $handle | The internal sqlite3 handle that points to the result set. |
Methods
Return an array containing all the values from a specific column. If no column is set, then the first will be returned
Return an array containing all values in the leftmost column, where the keys are the same as the values.
Iterator function implementation. Rewind the iterator to the first item and return it.
Iterator function implementation. Return the current item of the iterator.
Iterator function implementation. Return the first item of this iterator.
Iterator function implementation. Return the row number of the current item.
Iterator function implementation. Return the next record in the iterator.
Iterator function implementation. Check if the iterator is pointing to a valid item.
Hook the result-set given into a Query class, suitable for use by framework.
Details
array
column(string $column = null)
Return an array containing all the values from a specific column. If no column is set, then the first will be returned
array
keyedColumn()
Return an array containing all values in the leftmost column, where the keys are the same as the values.
array
map()
Return a map from the first column to the second column.
array
record()
Returns the next record in the iterator.
string
value()
Returns the first column of the first record.
string
table()
Return an HTML table containing the full result-set
array
rewind()
Iterator function implementation. Rewind the iterator to the first item and return it.
Makes use of seek()} and {@link numRecords(), takes care of the plumbing.
array
current()
Iterator function implementation. Return the current item of the iterator.
array
first()
Iterator function implementation. Return the first item of this iterator.
int
key()
Iterator function implementation. Return the row number of the current item.
array
next()
Iterator function implementation. Return the next record in the iterator.
Makes use of nextRecord(), takes care of the plumbing.
bool
valid()
Iterator function implementation. Check if the iterator is pointing to a valid item.
array
nextRecord()
Return the next record in the query result.
int
numRecords()
No description
array
seek($row)
Go to a specific row number in the query result and return the record.
__construct(SQLite3Connector $database, SQLite3Result $handle)
Hook the result-set given into a Query class, suitable for use by framework.
__destruct()
No description