Constructor QueryMessage
- Namespace
- MongoDB.Driver.Core.WireProtocol.Messages
- Assembly
- MongoDB.Driver.Core.dll
QueryMessage(int, CollectionNamespace, BsonDocument, BsonDocument, IElementNameValidator, int, int, bool, bool, bool, bool, bool, Func<bool>)
Initializes a new instance of the QueryMessage class.
public QueryMessage(int requestId, CollectionNamespace collectionNamespace, BsonDocument query, BsonDocument fields, IElementNameValidator queryValidator, int skip, int batchSize, bool secondaryOk, bool partialOk, bool noCursorTimeout, bool tailableCursor, bool awaitData, Func<bool> shouldBeSent = null)Parameters
- requestIdint
- The request identifier. 
- collectionNamespaceCollectionNamespace
- The collection namespace. 
- queryBsonDocument
- The query. 
- fieldsBsonDocument
- The fields. 
- queryValidatorIElementNameValidator
- The query validator. 
- skipint
- The number of documents to skip. 
- batchSizeint
- The size of a batch. 
- secondaryOkbool
- if set to - trueit is OK if the server is not the primary.
- partialOkbool
- if set to - truethe server is allowed to return partial results if any shards are unavailable.
- noCursorTimeoutbool
- if set to - truethe server should not timeout the cursor.
- tailableCursorbool
- if set to - truethe query should return a tailable cursor.
- awaitDatabool
- if set to - truethe server should await data (used with tailable cursors).
- shouldBeSentFunc<bool>
- A delegate that determines whether this message should be sent. 
QueryMessage(int, CollectionNamespace, BsonDocument, BsonDocument, IElementNameValidator, int, int, bool, bool, bool, bool, bool, bool, Func<bool>)
Initializes a new instance of the QueryMessage class.
[Obsolete("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
- requestIdint
- The request identifier. 
- collectionNamespaceCollectionNamespace
- The collection namespace. 
- queryBsonDocument
- The query. 
- fieldsBsonDocument
- The fields. 
- queryValidatorIElementNameValidator
- The query validator. 
- skipint
- The number of documents to skip. 
- batchSizeint
- The size of a batch. 
- secondaryOkbool
- if set to - trueit is OK if the server is not the primary.
- partialOkbool
- if set to - truethe server is allowed to return partial results if any shards are unavailable.
- noCursorTimeoutbool
- if set to - truethe server should not timeout the cursor.
- oplogReplaybool
- if set to - truethe OplogReplay bit will be set.
- tailableCursorbool
- if set to - truethe query should return a tailable cursor.
- awaitDatabool
- if set to - truethe server should await data (used with tailable cursors).
- shouldBeSentFunc<bool>
- A delegate that determines whether this message should be sent.