@@ -258,8 +258,8 @@ func (f *FindOptionsBuilder) SetSkip(i int64) *FindOptionsBuilder {
258258}
259259
260260// SetSort sets the value for the Sort field. Sort is a document specifying the order in which
261- // documents should be returned. The driver will return an error if the sort parameter is a
262- // multi-key map.
261+ // documents should be returned. The sort parameter is evaluated sequentially, so the driver will
262+ // return an error if it is a multi-key map (which is unordeded). The default value is nil .
263263func (f * FindOptionsBuilder ) SetSort (sort interface {}) * FindOptionsBuilder {
264264 f .Opts = append (f .Opts , func (opts * FindOptions ) error {
265265 opts .Sort = sort
@@ -426,8 +426,9 @@ func (f *FindOneOptionsBuilder) SetSkip(i int64) *FindOneOptionsBuilder {
426426}
427427
428428// SetSort sets the value for the Sort field. Sets a document specifying the sort order to
429- // apply to the query. The first document in the sorted order will be returned. The driver
430- // will return an error if the sort parameter is a multi-key map.
429+ // apply to the query. The first document in the sorted order will be returned. The sort
430+ // parameter is evaluated sequentially, so the driver will return an error if it is a multi-
431+ // key map (which is unordeded). The default value is nil.
431432func (f * FindOneOptionsBuilder ) SetSort (sort interface {}) * FindOneOptionsBuilder {
432433 f .Opts = append (f .Opts , func (opts * FindOneOptions ) error {
433434 opts .Sort = sort
@@ -539,8 +540,9 @@ func (f *FindOneAndReplaceOptionsBuilder) SetReturnDocument(rd ReturnDocument) *
539540
540541// SetSort sets the value for the Sort field. Sets a document specifying which document should
541542// be replaced if the filter used by the operation matches multiple documents in the collection.
542- // If set, the first document in the sorted order will be replaced. The driver will return an
543- // error if the sort parameter is a multi-key map. The default value is nil.
543+ // If set, the first document in the sorted order will be replaced. The sort parameter is evaluated
544+ // sequentially, so the driver will return an error if it is a multi-key map (which is unordeded).
545+ // The default value is nil.
544546func (f * FindOneAndReplaceOptionsBuilder ) SetSort (sort interface {}) * FindOneAndReplaceOptionsBuilder {
545547 f .Opts = append (f .Opts , func (opts * FindOneAndReplaceOptions ) error {
546548 opts .Sort = sort
@@ -716,8 +718,9 @@ func (f *FindOneAndUpdateOptionsBuilder) SetReturnDocument(rd ReturnDocument) *F
716718
717719// SetSort sets the value for the Sort field. Sets a document specifying which document should
718720// be updated if the filter used by the operation matches multiple documents in the collection.
719- // If set, the first document in the sorted order will be updated. The driver will return an
720- // error if the sort parameter is a multi-key map. The default value is nil.
721+ // If set, the first document in the sorted order will be updated. The sort parameter is evaluated
722+ // sequentially, so the driver will return an error if it is a multi-key map (which is unordeded).
723+ // The default value is nil.
721724func (f * FindOneAndUpdateOptionsBuilder ) SetSort (sort interface {}) * FindOneAndUpdateOptionsBuilder {
722725 f .Opts = append (f .Opts , func (opts * FindOneAndUpdateOptions ) error {
723726 opts .Sort = sort
@@ -846,8 +849,9 @@ func (f *FindOneAndDeleteOptionsBuilder) SetProjection(projection interface{}) *
846849
847850// SetSort sets the value for the Sort field. Sets a document specifying which document should
848851// be replaced if the filter used by the operation matches multiple documents in the collection.
849- // If set, the first document in the sorted order will be selected for replacement. The driver
850- // will return an error if the sort parameter is a multi-key map. The default value is nil.
852+ // If set, the first document in the sorted order will be deleted. The sort parameter is evaluated
853+ // sequentially, so the driver will return an error if it is a multi-key map (which is unordeded).
854+ // The default value is nil.
851855func (f * FindOneAndDeleteOptionsBuilder ) SetSort (sort interface {}) * FindOneAndDeleteOptionsBuilder {
852856 f .Opts = append (f .Opts , func (opts * FindOneAndDeleteOptions ) error {
853857 opts .Sort = sort
0 commit comments