MongoCommandCursor::info

(PECL mongo >=1.5.0) Gets information about the cursor's creation and iteration public array MongoCommandCursor::info ( void ) This can be called before or after the cursor has started iterating. Returns: Returns the namespace, batch size, limit, skip, flags, query, and projected fields for this cursor. If the cursor has started iterating, additional information about iteration and the connecti

MongoCommandCursor::getReadPreference

(PECL mongo >=1.6.0) Get the read preference for this command public array MongoCommandCursor::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 specified, tag

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

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::createFromDocument

(PECL mongo >=1.5.0) Create a new command cursor from an existing command response document public static MongoCommandCursor MongoCommandCursor::createFromDocument ( MongoClient $connection, string $hash, array $document ) Use this method if you have a raw command result with cursor information in it. Note that cursors created with this method cannot be iterated multiple times, as they will lack the original command neces

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

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::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

MongoCursorInterface::setReadPreference

(PECL mongo >=1.6.0) Set the read preference for this query abstract public MongoCursorInterface MongoCursorInterface::setReadPreference ( string $read_preference [, array $tags ] ) Parameters: read_preference The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient

MongoCursorInterface::info

(PECL mongo >=1.5.0) Gets information about the cursor's creation and iteration abstract public array MongoCursorInterface::info ( void ) Returns information about the cursor's creation and iteration. This can be called before or after the cursor has started iterating. Returns: Returns the namespace, batch size, limit, skip, flags, query, and projected fields for this cursor. If the cursor has