AggregateOptions

Represents available options for an aggregate call

Members

Functions

batchSize
inout(Nullable!int) batchSize()

Specifies the initial batch size for the cursor.

maxAwaitTime
void maxAwaitTime(Duration d)

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.

maxTime
void maxTime(Duration d)

Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out.

Variables

allowDiskUse
Nullable!bool allowDiskUse;

Enables writing to temporary files. When set to true, aggregation operations can write data to the _tmp subdirectory in the dbPath directory.

bypassDocumentValidation
Nullable!bool bypassDocumentValidation;

If true, allows the write to opt-out of document level validation. This only applies when the $out or $merge stage is specified.

collation
Nullable!Collation collation;

Collation allows users to specify language-specific rules for string comparison, such as rules for letter-case and accent marks.

comment
Nullable!string comment;

Users can specify an arbitrary string to help trace the operation through the database profiler, currentOp, and logs.

cursor
CursorInitArguments cursor;
Undocumented in source.
explain
Nullable!bool explain;
Undocumented in source.
hint
Nullable!Bson hint;

The index to use for the aggregation. The index is on the initial collection / view against which the aggregation is run.

let
Nullable!Bson let;

Map of parameter names and values. Values must be constant or closed expressions that do not reference document fields. Parameters can then be accessed as variables in an aggregate expression context (e.g. "$$var").

maxAwaitTimeMS
Nullable!long maxAwaitTimeMS;

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.

maxTimeMS
Nullable!long maxTimeMS;

Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out.

readConcern
Nullable!ReadConcern readConcern;

Specifies the read concern. Only compatible with a write stage. (e.g. $out, $merge)

See Also

Meta