Метод |
Описание |
|
__construct ( MongoClient $connection, string $ns, array $query = [], array $fields = [] ) |
Create a new cursor |
|
__sleep ( ) : array |
|
|
addOption ( string $key, mixed $value ) : MongoCursor |
Adds a top-level key/value pair to a query |
|
awaitData ( boolean $wait = true ) : MongoCursor |
(PECL mongo >= 1.2.11)
Sets whether this cursor will wait for a while for a tailable cursor to return more data |
|
count ( boolean $foundOnly = false ) : integer |
Counts the number of results for this query |
|
explain ( ) : array |
Return an explanation of the query, often useful for optimization and debugging |
|
fields ( array $f ) : MongoCursor |
Sets the fields for a query |
|
getNext ( ) : array |
Advances the cursor to the next result, and returns that result |
|
hasNext ( ) : boolean |
Checks if there are any more elements in this cursor |
|
hint ( array | string $keyPattern ) : MongoCursor |
Gives the database a hint about the query |
|
immortal ( boolean $liveForever = true ) : MongoCursor |
Sets whether this cursor will timeout |
|
limit ( integer $num ) : MongoCursor |
Limits the number of results returned |
|
maxTimeMS ( integer $ms ) |
|
|
partial ( boolean $okay = true ) : MongoCursor |
|
|
reset ( ) : void |
Clears the cursor |
|
setFlag ( integer $flag, boolean $set = true ) : MongoCursor |
|
|
skip ( integer $num ) : MongoCursor |
Skips a number of results |
|
slaveOkay ( boolean $okay = true ) : MongoCursor |
Sets whether this query can be done on a slave
This method will override the static class variable slaveOkay. |
|
snapshot ( ) : MongoCursor |
Use snapshot mode for the query |
|
sort ( array $fields ) : MongoCursor |
Sorts the results by given fields |
|
tailable ( boolean $tail = true ) : MongoCursor |
Sets whether this cursor will be left open after fetching the last results |
|