Fat-Free Framework
3.1.0 API Reference
|
DB\Cursor Class Reference
Simple cursor implementation. More...
Inheritance diagram for DB\Cursor:
Public Member Functions | |
find ($filter=NULL, array $options=NULL) | |
insert () | |
update () | |
dry () | |
findone ($filter=NULL, array $options=NULL, $ttl=0) | |
paginate ($pos=0, $size=10, $filter=NULL, array $options=NULL) | |
load ($filter=NULL, array $options=NULL) | |
first () | |
last () | |
skip ($ofs=1) | |
next () | |
prev () | |
save () | |
erase () | |
reset () | |
Public Member Functions inherited from Magic | |
exists ($key) | |
set ($key, $val) | |
get ($key) | |
clear ($key) | |
offsetexists ($key) | |
__isset ($key) | |
offsetset ($key, $val) | |
__set ($key, $val) | |
offsetget ($key) | |
__get ($key) | |
offsetunset ($key) | |
__unset ($key) | |
Public Attributes | |
$ptr =0 | |
Current position. | |
const | E_Field ='Undefined field %s' |
Protected Attributes | |
$query =array() | |
Query results. | |
Detailed Description
Simple cursor implementation.
Member Function Documentation
DB\Cursor::dry | ( | ) |
Return TRUE if current cursor position is not mapped to any record
- Returns
- bool
DB\Cursor::erase | ( | ) |
Delete current record
- Returns
- int|bool
|
abstract |
Return records (array of mapper objects) that match criteria
- Returns
- array
- Parameters
-
$filter string|array $options array
DB\Cursor::findone | ( | $filter = NULL , |
|
array | $options = NULL , |
||
$ttl = 0 |
|||
) |
Return first record (mapper object) that matches criteria
- Returns
- object|FALSE
- Parameters
-
$filter string|array $options array $ttl int
DB\Cursor::first | ( | ) |
Map to first record in cursor
- Returns
- mixed
|
abstract |
Insert new record
- Returns
- array
DB\Cursor::last | ( | ) |
Map to last record in cursor
- Returns
- mixed
DB\Cursor::load | ( | $filter = NULL , |
|
array | $options = NULL |
||
) |
Map to first record that matches criteria
- Returns
- array|FALSE
- Parameters
-
$filter string|array $options array
DB\Cursor::next | ( | ) |
Map next record
- Returns
- mixed
DB\Cursor::paginate | ( | $pos = 0 , |
|
$size = 10 , |
|||
$filter = NULL , |
|||
array | $options = NULL |
||
) |
Return array containing subset of records matching criteria, total number of records in superset, number of subsets available, and actual subset position
- Returns
- array
- Parameters
-
$pos int $size int $filter string|array $options array
DB\Cursor::prev | ( | ) |
Map previous record
- Returns
- mixed
DB\Cursor::reset | ( | ) |
Reset cursor
- Returns
- NULL
DB\Cursor::save | ( | ) |
Save mapped record
- Returns
- mixed
DB\Cursor::skip | ( | $ofs = 1 ) |
Map to nth record relative to current cursor position
- Returns
- mixed
- Parameters
-
$ofs int
|
abstract |
Update current record
- Returns
- array
The documentation for this class was generated from the following file:
- db/cursor.php
Generated on Mon Aug 19 2013 21:27:59 for Fat-Free Framework by 1.8.4