@@ -52,11 +52,11 @@ func (f *FindOptionsBuilder) List() []func(*FindOptions) error {
52
52
return f .Opts
53
53
}
54
54
55
- // SetAllowDiskUse sets the value for the AllowDiskUse field. AllowDiskUse specifies whether the
56
- // server can write temporary data to disk while executing the Find operation. This option is only
57
- // valid for MongoDB versions >= 4.4. Server versions >= 3.2 will report an error if this option
58
- // is specified. For server versions < 3.2, the driver will return a client-side error if this
59
- // option is specified. The default value is false.
55
+ // SetAllowDiskUse sets the value for the AllowDiskUse field. AllowDiskUse
56
+ // specifies whether the server can write temporary data to disk while executing
57
+ // the Find operation. This option is only valid for MongoDB versions >= 4.4.
58
+ // Server versions < 4.4 will return an error if this option is specified. The
59
+ // default value is false.
60
60
func (f * FindOptionsBuilder ) SetAllowDiskUse (b bool ) * FindOptionsBuilder {
61
61
f .Opts = append (f .Opts , func (opts * FindOptions ) error {
62
62
opts .AllowDiskUse = & b
@@ -86,10 +86,10 @@ func (f *FindOptionsBuilder) SetBatchSize(i int32) *FindOptionsBuilder {
86
86
return f
87
87
}
88
88
89
- // SetCollation sets the value for the Collation field. Collation specifies a collation to use for
90
- // string comparisons during the operation. This option is only valid for MongoDB versions >= 3.4.
91
- // For previous server versions, the driver will return an error if this option is used. The
92
- // default value is nil, which means the default collation of the collection will be used.
89
+ // SetCollation sets the value for the Collation field. Collation specifies a
90
+ // collation to use for string comparisons during the operation. The default
91
+ // value is nil, which means the default collation of the collection will be
92
+ // used.
93
93
func (f * FindOptionsBuilder ) SetCollation (collation * Collation ) * FindOptionsBuilder {
94
94
f .Opts = append (f .Opts , func (opts * FindOptions ) error {
95
95
opts .Collation = collation
@@ -167,11 +167,11 @@ func (f *FindOptionsBuilder) SetMax(max interface{}) *FindOptionsBuilder {
167
167
return f
168
168
}
169
169
170
- // SetMaxAwaitTime sets the value for the MaxAwaitTime field. MaxAwaitTime is the maximum amount of
171
- // time that the server should wait for new documents to satisfy a tailable cursor query. This
172
- // option is only valid for tailable await cursors (see the CursorType option for more information)
173
- // and MongoDB versions >= 3.2. For other cursor types or previous server versions, this option
174
- // is ignored.
170
+ // SetMaxAwaitTime sets the value for the MaxAwaitTime field. MaxAwaitTime is
171
+ // the maximum amount of time that the server should wait for new documents to
172
+ // satisfy a tailable cursor query. This option is only valid for tailable await
173
+ // cursors (see the CursorType option for more information). For other cursor
174
+ // types, this option is ignored.
175
175
func (f * FindOptionsBuilder ) SetMaxAwaitTime (d time.Duration ) * FindOptionsBuilder {
176
176
f .Opts = append (f .Opts , func (opts * FindOptions ) error {
177
177
opts .MaxAwaitTime = & d
@@ -314,10 +314,9 @@ func (f *FindOneOptionsBuilder) SetAllowPartialResults(b bool) *FindOneOptionsBu
314
314
return f
315
315
}
316
316
317
- // SetCollation sets the value for the Collation field. Specifies a collation to use for string
318
- // comparisons during the operation. This option is only valid for MongoDB versions >= 3.4. For
319
- // previous server versions, the driver will return an error if this option is used. The
320
- // default value is nil, which means the default collation of the collection will be used.
317
+ // SetCollation sets the value for the Collation field. Specifies a collation to
318
+ // use for string comparisons during the operation. The default value is nil,
319
+ // which means the default collation of the collection will be used.
321
320
func (f * FindOneOptionsBuilder ) SetCollation (collation * Collation ) * FindOneOptionsBuilder {
322
321
f .Opts = append (f .Opts , func (opts * FindOneOptions ) error {
323
322
opts .Collation = collation
@@ -471,8 +470,7 @@ func (f *FindOneAndReplaceOptionsBuilder) List() []func(*FindOneAndReplaceOption
471
470
}
472
471
473
472
// SetBypassDocumentValidation sets the value for the BypassDocumentValidation field. If true, writes
474
- // executed as part of the operation will opt out of document-level validation on the server. This
475
- // option is valid for MongoDB versions >= 3.2 and is ignored for previous server versions. The
473
+ // executed as part of the operation will opt out of document-level validation on the server. The
476
474
// default value is false. See https://www.mongodb.com/docs/manual/core/schema-validation/ for more
477
475
// information about document validation.
478
476
func (f * FindOneAndReplaceOptionsBuilder ) SetBypassDocumentValidation (b bool ) * FindOneAndReplaceOptionsBuilder {
@@ -485,10 +483,9 @@ func (f *FindOneAndReplaceOptionsBuilder) SetBypassDocumentValidation(b bool) *F
485
483
return f
486
484
}
487
485
488
- // SetCollation sets the value for the Collation field. Specifies a collation to use for string
489
- // comparisons during the operation. This option is only valid for MongoDB versions >= 3.4.
490
- // For previous server versions, the driver will return an error if this option is used. The
491
- // default value is nil, which means the default collation of the collection will be used.
486
+ // SetCollation sets the value for the Collation field. Specifies a collation to
487
+ // use for string comparisons during the operation. The default value is nil,
488
+ // which means the default collation of the collection will be used.
492
489
func (f * FindOneAndReplaceOptionsBuilder ) SetCollation (collation * Collation ) * FindOneAndReplaceOptionsBuilder {
493
490
f .Opts = append (f .Opts , func (opts * FindOneAndReplaceOptions ) error {
494
491
opts .Collation = collation
@@ -633,11 +630,10 @@ func (f *FindOneAndUpdateOptionsBuilder) List() []func(*FindOneAndUpdateOptions)
633
630
return f .Opts
634
631
}
635
632
636
- // SetArrayFilters sets the value for the ArrayFilters field. ArrayFilters is a set of filters
637
- // specifying to which array elements an update should apply. This option is only valid for
638
- // MongoDB versions >= 3.6. For previous server versions, the driver will return an error if
639
- // this option is used. The default value is nil, which means the update will apply to all
640
- // array elements.
633
+ // SetArrayFilters sets the value for the ArrayFilters field. ArrayFilters is a
634
+ // set of filters specifying to which array elements an update should apply. The
635
+ // default value is nil, which means the update will apply to all array
636
+ // elements.
641
637
func (f * FindOneAndUpdateOptionsBuilder ) SetArrayFilters (filters []interface {}) * FindOneAndUpdateOptionsBuilder {
642
638
f .Opts = append (f .Opts , func (opts * FindOneAndUpdateOptions ) error {
643
639
opts .ArrayFilters = filters
@@ -650,7 +646,6 @@ func (f *FindOneAndUpdateOptionsBuilder) SetArrayFilters(filters []interface{})
650
646
651
647
// SetBypassDocumentValidation sets the value for the BypassDocumentValidation field. If true,
652
648
// writes executed as part of the operation will opt out of document-level validation on the server.
653
- // This option is valid for MongoDB versions >= 3.2 and is ignored for previous server versions.
654
649
// The default value is false. See https://www.mongodb.com/docs/manual/core/schema-validation/
655
650
// for more information about document validation.
656
651
func (f * FindOneAndUpdateOptionsBuilder ) SetBypassDocumentValidation (b bool ) * FindOneAndUpdateOptionsBuilder {
@@ -663,10 +658,9 @@ func (f *FindOneAndUpdateOptionsBuilder) SetBypassDocumentValidation(b bool) *Fi
663
658
return f
664
659
}
665
660
666
- // SetCollation sets the value for the Collation field. Specifies a collation to use for string
667
- // comparisons during the operation. This option is only valid for MongoDB versions >= 3.4. For
668
- // previous server versions, the driver will return an error if this option is used. The default
669
- // value is nil, which means the default collation of the collection will be used.
661
+ // SetCollation sets the value for the Collation field. Specifies a collation to
662
+ // use for string comparisons during the operation. The default value is nil,
663
+ // which means the default collation of the collection will be used.
670
664
func (f * FindOneAndUpdateOptionsBuilder ) SetCollation (collation * Collation ) * FindOneAndUpdateOptionsBuilder {
671
665
f .Opts = append (f .Opts , func (opts * FindOneAndUpdateOptions ) error {
672
666
opts .Collation = collation
@@ -807,10 +801,9 @@ func (f *FindOneAndDeleteOptionsBuilder) List() []func(*FindOneAndDeleteOptions)
807
801
return f .Opts
808
802
}
809
803
810
- // SetCollation sets the value for the Collation field. Specifies a collation to use for string
811
- // comparisons during the operation. This option is only valid for MongoDB versions >= 3.4.
812
- // For previous server versions, the driver will return an error if this option is used. The
813
- // default value is nil, which means the default collation of the collection will be used.
804
+ // SetCollation sets the value for the Collation field. Specifies a collation to
805
+ // use for string comparisons during the operation. The default value is nil,
806
+ // which means the default collation of the collection will be used.
814
807
func (f * FindOneAndDeleteOptionsBuilder ) SetCollation (collation * Collation ) * FindOneAndDeleteOptionsBuilder {
815
808
f .Opts = append (f .Opts , func (opts * FindOneAndDeleteOptions ) error {
816
809
opts .Collation = collation
0 commit comments