MongoCommandCursor::__construct
Create a new command cursor
&reftitle.description;
public MongoCommandCursor::__construct
MongoClientconnection
stringns
arraycommandarray()
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.
&reftitle.parameters;
connection
Database connection.
ns
Full name of database and collection.
command
Database command.
&reftitle.returnvalues;
Returns the new cursor.