SequoiaDB
 All Classes Files Functions Variables Pages
Public Member Functions | List of all members
SequoiaCursor Class Reference

Public Member Functions

 next ()
 
 current ()
 
 getNext ()
 

Detailed Description

SequoiaCursor Class. To get this Class object must be call SequoiaDB::list or SequoiaDB::snapshot or SequoiaCL::find, and so on.

Class for create an object of the cursor

Member Function Documentation

SequoiaCursor::current ( )

Return the current element.

Returns
Returns the record, default return array.
Return values
arrayrecord
stringrecord

Example:

$cursor = $cl -> find( array( 'a' => array( '$lte' => 50 ) ) ) ;
if( empty( $cursor ) ) {
$err = $db -> getError() ;
echo "Failed to find, error code: ".$err['errno'] ;
return ;
}
if( $record = $cursor -> next() ) {
var_dump( $record ) ;
$record = $cursor -> current() ;
var_dump( $record ) ;
}
SequoiaCursor::getNext ( )

Drop the specified collection.

See Also
next().
Deprecated:
This function is deprecated, use the function next() instead.
SequoiaCursor::next ( )

Return the next record to which this cursor points, and advance the cursor.

Returns
Returns the record, default return array.
Return values
arrayrecord
stringrecord

Example:

$cursor = $cl -> find( array( 'a' => array( '$lte' => 50 ) ) ) ;
if( empty( $cursor ) ) {
$err = $db -> getError() ;
echo "Failed to find, error code: ".$err['errno'] ;
return ;
}
while( $record = $cursor -> next() ) {
var_dump( $record ) ;
}

The documentation for this class was generated from the following files: