@@ -211,6 +211,14 @@ pub struct UpdateOptions {
211
211
212
212
/// The write concern for the operation.
213
213
pub write_concern : Option < WriteConcern > ,
214
+
215
+ /// Map of parameter names and values. Values must be constant or closed
216
+ /// expressions that do not reference document fields. Parameters can then be
217
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
218
+ ///
219
+ /// Only available in MongoDB 5.0+.
220
+ #[ serde( rename = "let" ) ]
221
+ pub let_vars : Option < Document > ,
214
222
}
215
223
216
224
impl UpdateOptions {
@@ -221,6 +229,7 @@ impl UpdateOptions {
221
229
hint : options. hint ,
222
230
write_concern : options. write_concern ,
223
231
collation : options. collation ,
232
+ let_vars : options. let_vars ,
224
233
..Default :: default ( )
225
234
}
226
235
}
@@ -253,6 +262,14 @@ pub struct ReplaceOptions {
253
262
254
263
/// The write concern for the operation.
255
264
pub write_concern : Option < WriteConcern > ,
265
+
266
+ /// Map of parameter names and values. Values must be constant or closed
267
+ /// expressions that do not reference document fields. Parameters can then be
268
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
269
+ ///
270
+ /// Only available in MongoDB 5.0+.
271
+ #[ serde( rename = "let" ) ]
272
+ pub let_vars : Option < Document > ,
256
273
}
257
274
258
275
/// Specifies the options to a
@@ -276,6 +293,14 @@ pub struct DeleteOptions {
276
293
/// The index to use for the operation.
277
294
/// Only available in MongoDB 4.4+.
278
295
pub hint : Option < Hint > ,
296
+
297
+ /// Map of parameter names and values. Values must be constant or closed
298
+ /// expressions that do not reference document fields. Parameters can then be
299
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
300
+ ///
301
+ /// Only available in MongoDB 5.0+.
302
+ #[ serde( rename = "let" ) ]
303
+ pub let_vars : Option < Document > ,
279
304
}
280
305
281
306
/// Specifies the options to a
@@ -310,6 +335,14 @@ pub struct FindOneAndDeleteOptions {
310
335
/// The index to use for the operation.
311
336
/// Only available in MongoDB 4.4+.
312
337
pub hint : Option < Hint > ,
338
+
339
+ /// Map of parameter names and values. Values must be constant or closed
340
+ /// expressions that do not reference document fields. Parameters can then be
341
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
342
+ ///
343
+ /// Only available in MongoDB 5.0+.
344
+ #[ serde( rename = "let" ) ]
345
+ pub let_vars : Option < Document > ,
313
346
}
314
347
315
348
/// Specifies the options to a
@@ -353,6 +386,14 @@ pub struct FindOneAndReplaceOptions {
353
386
/// The index to use for the operation.
354
387
/// Only available in MongoDB 4.4+.
355
388
pub hint : Option < Hint > ,
389
+
390
+ /// Map of parameter names and values. Values must be constant or closed
391
+ /// expressions that do not reference document fields. Parameters can then be
392
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
393
+ ///
394
+ /// Only available in MongoDB 5.0+.
395
+ #[ serde( rename = "let" ) ]
396
+ pub let_vars : Option < Document > ,
356
397
}
357
398
358
399
/// Specifies the options to a
@@ -402,6 +443,14 @@ pub struct FindOneAndUpdateOptions {
402
443
/// The index to use for the operation.
403
444
/// Only available in MongoDB 4.4+.
404
445
pub hint : Option < Hint > ,
446
+
447
+ /// Map of parameter names and values. Values must be constant or closed
448
+ /// expressions that do not reference document fields. Parameters can then be
449
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
450
+ ///
451
+ /// Only available in MongoDB 5.0+.
452
+ #[ serde( rename = "let" ) ]
453
+ pub let_vars : Option < Document > ,
405
454
}
406
455
407
456
/// Specifies the options to a [`Collection::aggregate`](../struct.Collection.html#method.aggregate)
@@ -574,6 +623,12 @@ pub struct EstimatedDocumentCountOptions {
574
623
/// The level of the read concern.
575
624
#[ serde( skip_serializing) ]
576
625
pub read_concern : Option < ReadConcern > ,
626
+
627
+ /// Tags the query with an arbitrary BSON object to help trace the operation through the
628
+ /// database profiler, currentOp and logs.
629
+ ///
630
+ /// This option is only available on server versions 4.4+.
631
+ pub comment : Option < Bson > ,
577
632
}
578
633
579
634
/// Specifies the options to a [`Collection::distinct`](../struct.Collection.html#method.distinct)
@@ -720,6 +775,14 @@ pub struct FindOptions {
720
775
/// See the [documentation](https://www.mongodb.com/docs/manual/reference/collation/) for more
721
776
/// information on how to use this option.
722
777
pub collation : Option < Collation > ,
778
+
779
+ /// Map of parameter names and values. Values must be constant or closed
780
+ /// expressions that do not reference document fields. Parameters can then be
781
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
782
+ ///
783
+ /// Only available in MongoDB 5.0+.
784
+ #[ serde( rename = "let" ) ]
785
+ pub let_vars : Option < Document > ,
723
786
}
724
787
725
788
impl From < FindOneOptions > for FindOptions {
@@ -746,6 +809,7 @@ impl From<FindOneOptions> for FindOptions {
746
809
max_await_time : None ,
747
810
no_cursor_timeout : None ,
748
811
sort : options. sort ,
812
+ let_vars : options. let_vars ,
749
813
}
750
814
}
751
815
}
@@ -834,6 +898,14 @@ pub struct FindOneOptions {
834
898
835
899
/// The order of the documents for the purposes of the operation.
836
900
pub sort : Option < Document > ,
901
+
902
+ /// Map of parameter names and values. Values must be constant or closed
903
+ /// expressions that do not reference document fields. Parameters can then be
904
+ /// accessed as variables in an aggregate expression context (e.g. "$$var").
905
+ ///
906
+ /// Only available in MongoDB 5.0+.
907
+ #[ serde( rename = "let" ) ]
908
+ pub let_vars : Option < Document > ,
837
909
}
838
910
839
911
/// Specifies the options to a
0 commit comments