Class DibiResult
dibi result-set.
DibiObject | --DibiResult
Implements interfaces:
| Constructor Summary | |
|---|---|
| public |
__construct
(IDibiDriver $driver, array $config)
|
| Method Summary | |
|---|---|
| protected mixed |
convert
(mixed $value, int $type)
Converts value to specified type and format.
|
| int |
count
()
Required by the Countable interface.
|
| void |
detectTypes
()
Autodetect column types.
|
| void |
dump
()
Displays complete result-set as HTML table for debug purposes.
|
| DibiRow|FALSE |
fetch
()
Fetches the row at current position, process optional type conversion.
|
| array |
Fetches all records from table.
|
| DibiRow |
fetchAssoc
(string $assoc)
Fetches all records from table and returns associative tree.
|
| array |
Fetches all records from table like $key => $value pairs.
|
| mixed |
fetchSingle
()
Like fetch(), but returns only first field.
|
| void |
free
()
Frees the resources allocated for this result set.
|
| void |
getColumnNames
([$fullNames =
FALSE])
|
| void |
getColumns
()
|
| DibiResultInfo |
getInfo
()
Returns a meta information about the current result set.
|
| DibiResultIterator |
Required by the IteratorAggregate interface.
|
| mixed |
getResource
()
Returns the result set resource.
|
| string |
getRowClass
()
Returns fetched object class name.
|
| int |
getRowCount
()
Returns the number of rows in a result set.
|
| string |
getType
($col)
Returns column type.
|
| void |
rowCount
()
Returns the number of rows in a result set. Alias for getRowCount().
|
| boolean |
seek
(int $row)
Moves cursor position without fetching row.
|
| DibiResult |
setRowClass
(string $class)
Set fetched object class. This class should extend the DibiRow class.
|
| DibiResult |
setType
(string $col, string $type)
Define column type.
|
| DibiResult |
setTypes
($types)
Define multiple columns types.
|
| Constructor Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
line 60 __constructpublic __construct (IDibiDriver $driver, array $config)
|
|||||||||
| Method Details | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 552 convertprotected mixed convert (mixed $value, int $type) Converts value to specified type and format.
|
|||||||||||||||||||||
|
line 137 countpublic int count () Required by the Countable interface.
|
|||||||||||||||||||||
|
line 512 detectTypespublic void detectTypes () Autodetect column types.
|
|||||||||||||||||||||
|
line 642 dumppublic void dump () Displays complete result-set as HTML table for debug purposes.
|
|||||||||||||||||||||
|
line 212 fetchpublic DibiRow|FALSE fetch () Fetches the row at current position, process optional type conversion. and moves the internal cursor to the next position
|
|||||||||||||||||||||
|
line 261 fetchAllpublic array fetchAll ([int $offset = Fetches all records from table.
|
|||||||||||||||||||||
|
line 291 fetchAssocpublic DibiRow fetchAssoc (string $assoc) Fetches all records from table and returns associative tree. Examples:
|
|||||||||||||||||||||
|
line 439 fetchPairspublic array fetchPairs ([string $key = Fetches all records from table like $key => $value pairs.
|
|||||||||||||||||||||
|
line 237 fetchSinglepublic mixed fetchSingle () Like fetch(), but returns only first field.
|
|||||||||||||||||||||
|
line 90 freepublic void free () Frees the resources allocated for this result set.
|
|||||||||||||||||||||
|
line 627 getColumnNamespublic void getColumnNames ([$fullNames =
|
|||||||||||||||||||||
|
line 617 getColumnspublic void getColumns ()
|
|||||||||||||||||||||
|
line 604 getInfopublic DibiResultInfo getInfo () Returns a meta information about the current result set.
|
|||||||||||||||||||||
|
line 172 getIteratorpublic DibiResultIterator getIterator ([int $offset = Required by the IteratorAggregate interface.
|
|||||||||||||||||||||
|
line 79 getResourcepublic mixed getResource () Returns the result set resource.
|
|||||||||||||||||||||
|
line 200 getRowClasspublic string getRowClass () Returns fetched object class name.
|
|||||||||||||||||||||
|
line 148 getRowCountpublic int getRowCount () Returns the number of rows in a result set.
|
|||||||||||||||||||||
|
line 539 getTypepublic string getType ($col) Returns column type.
|
|||||||||||||||||||||
|
line 159 rowCountpublic void rowCount () Returns the number of rows in a result set. Alias for getRowCount().
|
|||||||||||||||||||||
|
line 126 seekpublic boolean seek (int $row) Moves cursor position without fetching row.
|
|||||||||||||||||||||
|
line 188 setRowClasspublic DibiResult setRowClass (string $class) Set fetched object class. This class should extend the DibiRow class.
|
|||||||||||||||||||||
|
line 500 setTypepublic DibiResult setType (string $col, string $type) Define column type.
|
|||||||||||||||||||||
|
line 527 setTypespublic DibiResult setTypes ($types) Define multiple columns types.
|
|||||||||||||||||||||