Package com.mongodb.client.model.bulk
Interface ClientBulkWriteOptions
The options to apply when executing a client-level bulk write operation.
- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Disables or enables checking against document validation rules, a.k.a., schema validation.static ClientBulkWriteOptions
Creates the default options.Sets the comment to attach to thebulkWrite
administration command.Sets variables that can be referenced from individual write operations with the"$$"
syntax, which in turn requires usingFilters.expr(Object)
when specifying filters.Enables or disables ordered execution of individual write operations.verboseResults
(Boolean verboseResults) Enables or disables requesting verbose results.
-
Method Details
-
clientBulkWriteOptions
Creates the default options.- Returns:
- The default options.
-
ordered
Enables or disables ordered execution of individual write operations. In an ordered execution a failure of an individual operation prevents the rest of them from being executed. In an unordered execution failures of individual operations do not prevent the rest of them from being executed.- Parameters:
ordered
- The ordered flag. Ifnull
, the client defaults totrue
.- Returns:
this
.
-
bypassDocumentValidation
Disables or enables checking against document validation rules, a.k.a., schema validation.- Parameters:
bypassDocumentValidation
- The flag specifying whether to bypass the document validation rules.null
represents the server default.- Returns:
this
.
-
let
Sets variables that can be referenced from individual write operations with the"$$"
syntax, which in turn requires usingFilters.expr(Object)
when specifying filters. Values must be constants or expressions that do not reference fields.- Parameters:
let
- The variables.null
represents the server default.- Returns:
this
.- MongoDB documentation
- Variables in Aggregation Expressions
-
comment
Sets the comment to attach to thebulkWrite
administration command.- Parameters:
comment
- The comment.null
represents the server default.- Returns:
this
.
-
verboseResults
Enables or disables requesting verbose results.- Parameters:
verboseResults
- The flag specifying whether to request verbose results. Ifnull
, the client defaults tofalse
. This value corresponds inversely to theerrorsOnly
field of thebulkWrite
administration command.- Returns:
this
.
-