MongoCommandCursor::key

(PECL mongo >=1.5.0) Returns the current result's index within the result set public int MongoCommandCursor::key ( void ) Returns: The current result's index within the result set. See also: Iterator::key() -

MongoCommandCursor::current

(PECL mongo >=1.5.0) Returns the current element public array MongoCommandCursor::current ( void ) This returns NULL until MongoCommandCursor::rewind() is called. Returns: The current result document as an associative array. NULL will be returned if there is no result. See also: Iterator::current() -

MongoCommandCursor::next

(PECL mongo >=1.5.0) Advances the cursor to the next result public void MongoCommandCursor::next ( void ) Returns: NULL. Exception: Throws MongoConnectionException if it cannot reach the database and MongoCursorTimeoutException if the timeout is exceeded. See also: Iterator::next() -

MongoCommandCursor::rewind

(PECL mongo >=1.5.0) Executes the command and resets the cursor to the start of the result set public array MongoCommandCursor::rewind ( void ) If the cursor has already started iteration, the command will be re-executed. Returns: The raw server result document. Exception: Throws MongoConnectionException if it cannot reach the database and MongoCursorTimeoutExc

MongoCommandCursor::dead

(PECL mongo >=1.5.0) Checks if there are results that have not yet been sent from the database public bool MongoCommandCursor::dead ( void ) This method checks whether the MongoCommandCursor cursor has been exhausted and the database has no more results to send to the client. A cursor being "dead" does not necessarily mean that there are no more results available for iteration. Returns: Returns

MongoCursorInterface::getReadPreference

(PECL mongo >=1.6.0) Get the read preference for this query abstract public array MongoCursorInterface::getReadPreference ( void ) Returns: This function returns an array describing the read preference. The array contains the values type for the string read preference mode (corresponding to the MongoClient constants), and tagsets containing a list of all tag set criteria. If no tag sets were speci

MongoCommandCursor::batchSize

(PECL mongo >=1.5.0) Limits the number of elements returned in one batch. public MongoCommandCursor MongoCommandCursor::batchSize ( int $batchSize ) A cursor typically fetches a batch of result objects and store them locally. This method sets the batchSize value to configure the amount of documents retrieved from the server in one round trip. Parameters: batchSize The

MongoCursorInterface::batchSize

(PECL mongo >=1.5.0) Limits the number of elements returned in one batch. abstract public MongoCursorInterface MongoCursorInterface::batchSize ( int $batchSize ) A cursor typically fetches a batch of result objects and stores them locally. This method sets the batch size value to configure the amount of documents retrieved from the server in one round trip. Parameters: batchSize

MongoCursorInterface::timeout

(PECL mongo >=1.5.0) Sets a client-side timeout for this query abstract public MongoCursorInterface MongoCursorInterface::timeout ( int $ms ) A timeout can be set at any time and will affect subsequent data retrieval associated with this cursor, including fetching more results from the database. Parameters: ms The number of milliseconds for the cursor to wait for a res

MongoCommandCursor::__construct

(PECL mongo >=1.5.0) Create a new command cursor public MongoCommandCursor::__construct ( MongoClient $connection, string $ns, array $command = array() ) Generally, you should not have to construct a MongoCommandCursor manually, as there are helper functions such as MongoCollection::aggregateCursor() and MongoCollection::parallelCollectionScan(); however, if the server introduces new commands that can return cursors, thi