Common Parameters#
Several of the collection operations accept an overlapping set of named parameters, passed via fields of an aggregate type associated with the operation. This page will document the semantics of those parameters.
-
struct __common_params#
An exposition-only struct of common operation parameters.
-
bool bypass_document_validation#
A boolean option that is valid for commands which insert or modify content of a collection. If
true
, then documents can be created in a collection which do not meet its validation requirements.
-
bson_view collation#
This field represents an optional collation to be used with a search operation. If given a
null view
, then no collation will be attached to the query.See also
-
bson_value_ref comment#
Specify an arbitrary value to be attached to the command. This has no behavioral effect, but does appear in server-side log messages and database profiler output. If this is a null reference, no comment will be attached to database commands.
-
bson_value_ref hint#
Specifiy an index hint for an operation. If zero-initialized, no hint will be used. This value must be a null reference, a string, or a document view.
-
bson_view let#
Specify a list of variables that may be substituted in the associated operation query.
-
int64_t limit#
Specifiy a non-negative limit. This will set the maximum number of results to return from a query. A limit of zero is equivalent to specifying no limit.
-
bson_view max#
-
bson_view min#
Specify the exclusive upper bound and inclusive lower bound for the index specified with the
hint
field.Note
If either of these are set, then
hint
must also be provided.
-
bson_view projection#
Set the projection document for a query.
See also
projection (MongoDB Glossary)
-
bool bypass_document_validation#