Class FindOperation<TDocument>
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a Find command operation.
public class FindOperation<TDocument> : IReadOperation<IAsyncCursor<TDocument>>, IExecutableInRetryableReadContext<IAsyncCursor<TDocument>>, IExplainableOperation
Type Parameters
TDocument
The type of the document.
- Inheritance
-
FindOperation<TDocument>
- Implements
-
IReadOperation<IAsyncCursor<TDocument>>IExecutableInRetryableReadContext<IAsyncCursor<TDocument>>
- Inherited Members
- Extension Methods
Constructors
- FindOperation(CollectionNamespace, IBsonSerializer<TDocument>, MessageEncoderSettings)
Initializes a new instance of the FindOperation<TDocument> class.
Properties
- AllowDiskUse
Gets or sets a value indicating whether the server is allowed to write to disk while executing the Find operation.
- AllowPartialResults
Gets or sets a value indicating whether the server is allowed to return partial results if any shards are unavailable.
- BatchSize
Gets or sets the size of a batch.
- Collation
Gets or sets the collation.
- CollectionNamespace
Gets the collection namespace.
- Comment
Gets or sets the comment.
- CursorType
Gets or sets the type of the cursor.
- Filter
Gets or sets the filter.
- FirstBatchSize
Gets or sets the size of the first batch.
- Hint
Gets or sets the hint.
- Let
Gets or sets the let document.
- Limit
Gets or sets the limit.
- Max
Gets or sets the max key value.
- MaxAwaitTime
Gets or sets the maximum await time for TailableAwait cursors.
- MaxScan
Gets or sets the max scan.
- MaxTime
Gets or sets the maximum time the server should spend on this operation.
- MessageEncoderSettings
Gets the message encoder settings.
- Min
Gets or sets the min key value.
- Modifiers
Gets or sets any additional query modifiers.
- NoCursorTimeout
Gets or sets a value indicating whether the server will not timeout the cursor.
- OplogReplay
Gets or sets a value indicating whether the OplogReplay bit will be set.
- Projection
Gets or sets the projection.
- ReadConcern
Gets or sets the read concern.
- ResultSerializer
Gets the result serializer.
- RetryRequested
Gets or sets a value indicating whether to retry.
- ReturnKey
Gets or sets whether to only return the key values.
- ShowRecordId
Gets or sets whether the record Id should be added to the result document.
- SingleBatch
Gets or sets whether to return only a single batch.
- Skip
Gets or sets the number of documents skip.
- Snapshot
Gets or sets whether to use snapshot behavior.
- Sort
Gets or sets the sort specification.
Methods
- CreateCommand(ConnectionDescription, ICoreSession)
Creates the command to be explained.
- Execute(IReadBinding, CancellationToken)
Executes the operation.
- Execute(RetryableReadContext, CancellationToken)
Executes the first attempt.
- ExecuteAsync(IReadBinding, CancellationToken)
Executes the operation.
- ExecuteAsync(RetryableReadContext, CancellationToken)
Executes the first attempt.