Table of Contents

Class CountDocumentsOperation

Namespace
MongoDB.Driver.Core.Operations
Assembly
MongoDB.Driver.Core.dll

Represents a count documents operation. For a fast estimate of the total documents in a collection see CountOperation.

[Obsolete("This class will be made internal in a later release.")]
public class CountDocumentsOperation : IReadOperation<long>
Inheritance
CountDocumentsOperation
Implements
Inherited Members
Extension Methods

Constructors

CountDocumentsOperation(CollectionNamespace, MessageEncoderSettings)

Initializes a new instance of the CountOperation class.

Properties

Collation

Gets or sets the collation.

CollectionNamespace

Gets the collection namespace.

Comment

Gets or sets the comment.

Filter

Gets or sets the filter.

Hint

Gets or sets the index hint.

Limit

Gets or sets a limit on the number of matching documents to count.

MaxTime

Gets or sets the maximum time the server should spend on this operation.

MessageEncoderSettings

Gets the message encoder settings.

ReadConcern

Gets or sets the read concern.

RetryRequested

Gets or sets a value indicating whether to retry.

Skip

Gets or sets the number of documents to skip before counting the remaining matching documents.

Methods

Execute(IReadBinding, CancellationToken)

Executes the operation.

ExecuteAsync(IReadBinding, CancellationToken)

Executes the operation.