@@ -60,9 +60,9 @@ type FindOptions struct {
60
60
// MaxTime is the maximum amount of time that the query can run on the server. The default value is nil, meaning that there
61
61
// is no time limit for query execution.
62
62
//
63
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver. The more general
64
- // Timeout option should be used in its place to control the amount of time that the Find operation can run before
65
- // returning an error. MaxTime is still usable through the deprecated setter .
63
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release. The more general Timeout option may be used in its
64
+ // place to control the amount of time that a single operation can run before returning an error. MaxTime is ignored if
65
+ // Timeout is set on the client .
66
66
MaxTime * time.Duration
67
67
68
68
// Min is a document specifying the inclusive lower bound for a specific index. The default value is 0, which means that
@@ -184,9 +184,9 @@ func (f *FindOptions) SetMaxAwaitTime(d time.Duration) *FindOptions {
184
184
185
185
// SetMaxTime specifies the max time to allow the query to run.
186
186
//
187
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver.
188
- // The more general Timeout option should be used in its place to control the amount of time that the
189
- // Find operation can run before returning an error.
187
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release. The more general Timeout
188
+ // option may be used used in its place to control the amount of time that a single operation
189
+ // can run before returning an error. MaxTime is ignored if Timeout is set on the client .
190
190
func (f * FindOptions ) SetMaxTime (d time.Duration ) * FindOptions {
191
191
f .MaxTime = & d
192
192
return f
@@ -370,9 +370,9 @@ type FindOneOptions struct {
370
370
// The maximum amount of time that the query can run on the server. The default value is nil, meaning that there
371
371
// is no time limit for query execution.
372
372
//
373
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
374
- // Timeout option should be used in its place to control the amount of time that the FindOne operation can run before
375
- // returning an error. MaxTime is still usable through the deprecated setter .
373
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout option may be used
374
+ // in its place to control the amount of time that a single operation can run before returning an error. MaxTime
375
+ // is ignored if Timeout is set on the client .
376
376
MaxTime * time.Duration
377
377
378
378
// A document specifying the inclusive lower bound for a specific index. The default value is 0, which means that
@@ -478,9 +478,9 @@ func (f *FindOneOptions) SetMaxAwaitTime(d time.Duration) *FindOneOptions {
478
478
479
479
// SetMaxTime sets the value for the MaxTime field.
480
480
//
481
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
482
- // Timeout option should be used in its place to control the amount of time that the FindOne operation can run before
483
- // returning an error.
481
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout
482
+ // option may be used in its place to control the amount of time that a single operation can
483
+ // run before returning an error. MaxTime is ignored if Timeout is set on the client .
484
484
func (f * FindOneOptions ) SetMaxTime (d time.Duration ) * FindOneOptions {
485
485
f .MaxTime = & d
486
486
return f
@@ -634,9 +634,9 @@ type FindOneAndReplaceOptions struct {
634
634
// The maximum amount of time that the query can run on the server. The default value is nil, meaning that there
635
635
// is no time limit for query execution.
636
636
//
637
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
638
- // Timeout option should be used in its place to control the amount of time that the FindOneAndReplace operation can
639
- // run before returning an error. MaxTime is still usable through the deprecated setter .
637
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout option may be used
638
+ // in its place to control the amount of time that a single operation can run before returning an error. MaxTime
639
+ // is ignored if Timeout is set on the client .
640
640
MaxTime * time.Duration
641
641
642
642
// A document describing which fields will be included in the document returned by the operation. The default value
@@ -696,9 +696,9 @@ func (f *FindOneAndReplaceOptions) SetComment(comment interface{}) *FindOneAndRe
696
696
697
697
// SetMaxTime sets the value for the MaxTime field.
698
698
//
699
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
700
- // Timeout option should be used in its place to control the amount of time that the FindOneAndReplace operation can
701
- // run before returning an error.
699
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout
700
+ // option may be used in its place to control the amount of time that a single operation can
701
+ // run before returning an error. MaxTime is ignored if Timeout is set on the client.
702
702
func (f * FindOneAndReplaceOptions ) SetMaxTime (d time.Duration ) * FindOneAndReplaceOptions {
703
703
f .MaxTime = & d
704
704
return f
@@ -808,9 +808,9 @@ type FindOneAndUpdateOptions struct {
808
808
// The maximum amount of time that the query can run on the server. The default value is nil, meaning that there
809
809
// is no time limit for query execution.
810
810
//
811
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
812
- // Timeout option should be used in its place to control the amount of time that the FindOneAndUpdate operation can run
813
- // before returning an error. MaxTime is still usable through the deprecated setter .
811
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout option may be used
812
+ // in its place to control the amount of time that a single operation can run before returning an error. MaxTime is
813
+ // ignored if Timeout is set on the client .
814
814
MaxTime * time.Duration
815
815
816
816
// A document describing which fields will be included in the document returned by the operation. The default value
@@ -876,9 +876,9 @@ func (f *FindOneAndUpdateOptions) SetComment(comment interface{}) *FindOneAndUpd
876
876
877
877
// SetMaxTime sets the value for the MaxTime field.
878
878
//
879
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
880
- // Timeout option should be used in its place to control the amount of time that the FindOneAndUpdate operation can run
881
- // before returning an error.
879
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout
880
+ // option may be used in its place to control the amount of time that a single operation can
881
+ // run before returning an error. MaxTime is ignored if Timeout is set on the client .
882
882
func (f * FindOneAndUpdateOptions ) SetMaxTime (d time.Duration ) * FindOneAndUpdateOptions {
883
883
f .MaxTime = & d
884
884
return f
@@ -980,9 +980,9 @@ type FindOneAndDeleteOptions struct {
980
980
// The maximum amount of time that the query can run on the server. The default value is nil, meaning that there
981
981
// is no time limit for query execution.
982
982
//
983
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
984
- // Timeout option should be used in its place to control the amount of time that the FindOneAndDelete operation can run
985
- // before returning an error. MaxTime is still usable through the deprecated setter .
983
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout option may be used
984
+ // in its place to control the amount of time that a single operation can run before returning an error. MaxTime
985
+ // is ignored if Timeout is set on the client .
986
986
MaxTime * time.Duration
987
987
988
988
// A document describing which fields will be included in the document returned by the operation. The default value
@@ -1028,9 +1028,9 @@ func (f *FindOneAndDeleteOptions) SetComment(comment interface{}) *FindOneAndDel
1028
1028
1029
1029
// SetMaxTime sets the value for the MaxTime field.
1030
1030
//
1031
- // Deprecated: This option is deprecated and will eventually be removed in version 2.0 of the driver . The more general
1032
- // Timeout option should be used in its place to control the amount of time that the FindOneAndDelete operation can run
1033
- // before returning an error.
1031
+ // NOTE(benjirewis): MaxTime will be deprecated in a future release . The more general Timeout
1032
+ // option may be used in its place to control the amount of time that a single operation can
1033
+ // run before returning an error. MaxTime is ignored if Timeout is set on the client .
1034
1034
func (f * FindOneAndDeleteOptions ) SetMaxTime (d time.Duration ) * FindOneAndDeleteOptions {
1035
1035
f .MaxTime = & d
1036
1036
return f
0 commit comments