vibe.db.mongo.cursor

MongoDB cursor abstraction

Types 1

structMongoCursor(DocType = Bson)

Represents a cursor for a MongoDB query.

Use foreach( doc; cursor ) to iterate over the list of documents.

This struct uses reference counting to destroy the underlying MongoDB cursor.

Methods
bool empty() @propertyReturns true if there are no more documents for this cursor.
DocType front() @propertyReturns the current document of the response.
MongoCursor sort(T)(T order)Controls the order in which the query returns matching documents.
MongoCursor limit(long count)Limits the number of documents that the cursor returns.
MongoCursor skip(long count)Skips a given number of elements at the beginning of the cursor.
void popFront()Advances the cursor to the next document of the response.
auto byPair()Iterates over all remaining documents.
Constructors
this(MongoClient client, string collection, QueryFlags flags, int nskip, int nret, Q query, S return_field_selector)
this(MongoClient client, string collection, long cursor, DocType[] existing_documents)
this(MongoClient client, string database, string collection, Q query, FindOptions options)
this(MongoClient client, Bson command, int batchSize = 0, Duration getMoreMaxTime = Duration.max)
Destructors