Click or drag to resize

MongoCursor Methods

The MongoCursor type exposes the following members.

Methods
  NameDescription
Public methodClone(Type)
Creates a clone of the cursor.
Public methodClone(Type, IBsonSerializer)
Creates a clone of the cursor.
Public methodCloneTDocument
Creates a clone of the cursor.
Public methodCloneTDocument(IBsonSerializer)
Creates a clone of the cursor.
Public methodCount
Returns the number of documents that match the query (ignores Skip and Limit, unlike Size which honors them).
Public methodStatic memberCreate(Type, MongoCollection, IMongoQuery, ReadPreference, IBsonSerializer) Obsolete.
Creates a cursor.
Public methodStatic memberCreate(Type, MongoCollection, IMongoQuery, ReadConcern, ReadPreference, IBsonSerializer) Obsolete.
Creates a cursor.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExplain
Returns an explanation of how the query was executed (instead of the results).
Public methodExplain(Boolean)
Returns an explanation of how the query was executed (instead of the results).
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIEnumerableGetEnumerator
Gets the non-generic enumerator.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetBatchSize
Sets the batch size (the number of documents returned per batch).
Public methodSetCollation
Sets the collation.
Public methodSetFields(String)
Sets the fields that will be returned from the server.
Public methodSetFields(IMongoFields)
Sets the fields that will be returned from the server.
Public methodSetFlags
Sets the query flags.
Public methodSetHint(String)
Sets the index hint for the query.
Public methodSetHint(BsonDocument)
Sets the index hint for the query.
Public methodSetLimit
Sets the limit on the number of documents to be returned.
Public methodSetMax
Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically).
Public methodSetMaxAwaitTime
Sets the maximum await time for tailable await cursors.
Public methodSetMaxScan
Sets the maximum number of documents to scan.
Public methodSetMaxTime
Sets the maximum time the server should spend on this query.
Public methodSetMin
Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically).
Public methodSetOption
Sets a cursor option.
Public methodSetOptions
Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use.
Public methodSetReadPreference
Sets the read preference.
Public methodSetSerializer
Sets the serializer.
Public methodSetShowDiskLoc
Sets the $showDiskLoc option.
Public methodSetSkip
Sets the number of documents the server should skip before returning the rest of the documents.
Public methodSetSnapshot
Sets the $snapshot option.
Public methodSetSortOrder(String)
Sets the sort order for the server to sort the documents by before returning them.
Public methodSetSortOrder(IMongoSortBy)
Sets the sort order for the server to sort the documents by before returning them.
Public methodSize
Returns the size of the result set (honors Skip and Limit, unlike Count which does not).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also