Click or drag to resize

QueryMessage Constructor (Int32, CollectionNamespace, BsonDocument, BsonDocument, IElementNameValidator, Int32, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, FuncBoolean)

Note: This API is now obsolete.

Initializes a new instance of the QueryMessage class.

Namespace:  MongoDB.Driver.Core.WireProtocol.Messages
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax
[ObsoleteAttribute("Use a constructor that does not have an oplogReplay parameter instead.")]
public QueryMessage(
	int requestId,
	CollectionNamespace collectionNamespace,
	BsonDocument query,
	BsonDocument fields,
	IElementNameValidator queryValidator,
	int skip,
	int batchSize,
	bool secondaryOk,
	bool partialOk,
	bool noCursorTimeout,
	bool oplogReplay,
	bool tailableCursor,
	bool awaitData,
	Func<bool> shouldBeSent = null
)

Parameters

requestId
Type: SystemInt32
The request identifier.
collectionNamespace
Type: MongoDB.DriverCollectionNamespace
The collection namespace.
query
Type: MongoDB.BsonBsonDocument
The query.
fields
Type: MongoDB.BsonBsonDocument
The fields.
queryValidator
Type: MongoDB.Bson.IOIElementNameValidator
The query validator.
skip
Type: SystemInt32
The number of documents to skip.
batchSize
Type: SystemInt32
The size of a batch.
secondaryOk
Type: SystemBoolean
if set to true it is OK if the server is not the primary.
partialOk
Type: SystemBoolean
if set to true the server is allowed to return partial results if any shards are unavailable.
noCursorTimeout
Type: SystemBoolean
if set to true the server should not timeout the cursor.
oplogReplay
Type: SystemBoolean
if set to true the OplogReplay bit will be set.
tailableCursor
Type: SystemBoolean
if set to true the query should return a tailable cursor.
awaitData
Type: SystemBoolean
if set to true the server should await data (used with tailable cursors).
shouldBeSent (Optional)
Type: SystemFuncBoolean
A delegate that determines whether this message should be sent.
See Also