@@ -70,12 +70,13 @@ func (dom *DeleteOneModel) SetCollation(collation *options.Collation) *DeleteOne
70
70
return dom
71
71
}
72
72
73
- // SetHint specifies the index to use for the operation. This should either be the index name as a string or the index
74
- // specification as a document. This option is only valid for MongoDB versions >= 4.4. Server versions >= 3.4 will
75
- // return an error if this option is specified. For server versions < 3.4, the driver will return a client-side error if
76
- // this option is specified. The driver will return an error if this option is specified during an unacknowledged write
77
- // operation. The driver will return an error if the hint parameter is a multi-key map. The default value is nil, which
78
- // means that no hint will be sent.
73
+ // SetHint specifies the index to use for the operation. This should either be
74
+ // the index name as a string or the index specification as a document. This
75
+ // option is only valid for MongoDB versions >= 4.4. Server versions < 4.4 will
76
+ // return an error if this option is specified. The driver will return an error
77
+ // if this option is specified during an unacknowledged write operation. The
78
+ // driver will return an error if the hint parameter is a multi-key map. The
79
+ // default value is nil, which means that no hint will be sent.
79
80
func (dom * DeleteOneModel ) SetHint (hint interface {}) * DeleteOneModel {
80
81
dom .Hint = hint
81
82
return dom
@@ -111,12 +112,13 @@ func (dmm *DeleteManyModel) SetCollation(collation *options.Collation) *DeleteMa
111
112
return dmm
112
113
}
113
114
114
- // SetHint specifies the index to use for the operation. This should either be the index name as a string or the index
115
- // specification as a document. This option is only valid for MongoDB versions >= 4.4. Server versions >= 3.4 will
116
- // return an error if this option is specified. For server versions < 3.4, the driver will return a client-side error if
117
- // this option is specified. The driver will return an error if this option is specified during an unacknowledged write
118
- // operation. The driver will return an error if the hint parameter is a multi-key map. The default value is nil, which
119
- // means that no hint will be sent.
115
+ // SetHint specifies the index to use for the operation. This should either be
116
+ // the index name as a string or the index specification as a document. This
117
+ // option is only valid for MongoDB versions >= 4.4. Server versions < 4.4 will
118
+ // return an error if this option is specified. The driver will return an error
119
+ // if this option is specified during an unacknowledged write operation. The
120
+ // driver will return an error if the hint parameter is a multi-key map. The
121
+ // default value is nil, which means that no hint will be sent.
120
122
func (dmm * DeleteManyModel ) SetHint (hint interface {}) * DeleteManyModel {
121
123
dmm .Hint = hint
122
124
return dmm
@@ -141,12 +143,13 @@ func NewReplaceOneModel() *ReplaceOneModel {
141
143
return & ReplaceOneModel {}
142
144
}
143
145
144
- // SetHint specifies the index to use for the operation. This should either be the index name as a string or the index
145
- // specification as a document. This option is only valid for MongoDB versions >= 4.2. Server versions >= 3.4 will
146
- // return an error if this option is specified. For server versions < 3.4, the driver will return a client-side error if
147
- // this option is specified. The driver will return an error if this option is specified during an unacknowledged write
148
- // operation. The driver will return an error if the hint parameter is a multi-key map. The default value is nil, which
149
- // means that no hint will be sent.
146
+ // SetHint specifies the index to use for the operation. This should either be
147
+ // the index name as a string or the index specification as a document. This
148
+ // option is only valid for MongoDB versions >= 4.2. Server versions < 4.2 will
149
+ // return an error if this option is specified. The driver will return an error
150
+ // if this option is specified during an unacknowledged write operation. The
151
+ // driver will return an error if the hint parameter is a multi-key map. The
152
+ // default value is nil, which means that no hint will be sent.
150
153
func (rom * ReplaceOneModel ) SetHint (hint interface {}) * ReplaceOneModel {
151
154
rom .Hint = hint
152
155
return rom
@@ -211,12 +214,13 @@ func NewUpdateOneModel() *UpdateOneModel {
211
214
return & UpdateOneModel {}
212
215
}
213
216
214
- // SetHint specifies the index to use for the operation. This should either be the index name as a string or the index
215
- // specification as a document. This option is only valid for MongoDB versions >= 4.2. Server versions >= 3.4 will
216
- // return an error if this option is specified. For server versions < 3.4, the driver will return a client-side error if
217
- // this option is specified. The driver will return an error if this option is specified during an unacknowledged write
218
- // operation. The driver will return an error if the hint parameter is a multi-key map. The default value is nil, which
219
- // means that no hint will be sent.
217
+ // SetHint specifies the index to use for the operation. This should either be
218
+ // the index name as a string or the index specification as a document. This
219
+ // option is only valid for MongoDB versions >= 4.2. Server versions < 4.2 will
220
+ // return an error if this option is specified. The driver will return an error
221
+ // if this option is specified during an unacknowledged write operation. The
222
+ // driver will return an error if the hint parameter is a multi-key map. The
223
+ // default value is nil, which means that no hint will be sent.
220
224
func (uom * UpdateOneModel ) SetHint (hint interface {}) * UpdateOneModel {
221
225
uom .Hint = hint
222
226
return uom
@@ -287,12 +291,13 @@ func NewUpdateManyModel() *UpdateManyModel {
287
291
return & UpdateManyModel {}
288
292
}
289
293
290
- // SetHint specifies the index to use for the operation. This should either be the index name as a string or the index
291
- // specification as a document. This option is only valid for MongoDB versions >= 4.2. Server versions >= 3.4 will
292
- // return an error if this option is specified. For server versions < 3.4, the driver will return a client-side error if
293
- // this option is specified. The driver will return an error if this option is specified during an unacknowledged write
294
- // operation. The driver will return an error if the hint parameter is a multi-key map. The default value is nil, which
295
- // means that no hint will be sent.
294
+ // SetHint specifies the index to use for the operation. This should either be
295
+ // the index name as a string or the index specification as a document. This
296
+ // option is only valid for MongoDB versions >= 4.2. Server versions < 4.2 will
297
+ // return an error if this option is specified. The driver will return an error
298
+ // if this option is specified during an unacknowledged write operation. The
299
+ // driver will return an error if the hint parameter is a multi-key map. The
300
+ // default value is nil, which means that no hint will be sent.
296
301
func (umm * UpdateManyModel ) SetHint (hint interface {}) * UpdateManyModel {
297
302
umm .Hint = hint
298
303
return umm
0 commit comments