MongoCommandCursor::__construct

(PECL mongo >=1.5.0)

MongoCommandCursor::__constructCreate a new command cursor

說明

public MongoCommandCursor::__construct ( MongoClient $connection , string $ns [, array $command = array() ] )

In many instances, you do not have to create a MongoCommandCursor manually, but instead one of the helper functions such as MongoCollection::aggregateCursor() and MongoCollection::parallelCollectionScan(). However, if the server adds new commands that can return cursors, then manually creating MongoCommandCursor objects is required. However, it might be easier to use the MongoCommandCursor::createFromDocument() instead.

參數

connection

Database connection.

ns

Full name of database and collection.

command

Database command.

回傳值

Returns the new cursor.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top