vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Struct AggregateOptions

Represents available options for an aggregate call

struct AggregateOptions ;

Fields

NameTypeDescription
allowDiskUse std.typecons.Nullable!(bool)Enables writing to temporary files. When set to true, aggregation operations can write data to the tmp subdirectory in the dbPath directory.
bypassDocumentValidation std.typecons.Nullable!(bool)If true, allows the write to opt-out of document level validation. This only applies when the $out or $merge stage is specified.
collation std.typecons.Nullable!(vibe.db.mongo.collection.Collation)Collation allows users to specify language-specific rules for string comparison, such as rules for letter-case and accent marks.
comment std.typecons.Nullable!(string)Users can specify an arbitrary string to help trace the operation through the database profiler, currentOp, and logs.
cursor CursorInitArguments
explain std.typecons.Nullable!(bool)
hint std.typecons.Nullable!(vibe.data.bson.Bson)The index to use for the aggregation. The index is on the initial collection / view against which the aggregation is run.
let std.typecons.Nullable!(vibe.data.bson.Bson)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 std.typecons.Nullable!(long)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 std.typecons.Nullable!(long)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 std.typecons.Nullable!(vibe.db.mongo.collection.ReadConcern)Specifies the read concern. Only compatible with a write stage. (e.g. $out, $merge)

Properties

NameTypeDescription
batchSize[get] inout(std.typecons.Nullable!(int))Specifies the initial batch size for the cursor.

Methods

NameDescription
maxAwaitTime (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 (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.

See Also

https://www.mongodb.com/docs/manual/reference/command/aggregate/#dbcmd.aggregate

Standards

https://github.com/mongodb/specifications/blob/525dae0aa8791e782ad9dd93e507b60c55a737bb/source/crud/crud.rst#id16

Authors

Jan Jurzitza

Copyright

© 2022 Jan Jurzitza

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.