@@ -13,7 +13,7 @@ var aggregateBundle = new(AggregateBundle)
13
13
// Aggregate is options for the aggregate() function
14
14
type Aggregate interface {
15
15
aggregate ()
16
- ConvertOption () option.Optioner
16
+ ConvertOption () option.AggregateOptioner
17
17
}
18
18
19
19
// AggregateBundle is a bundle of Aggregate options
@@ -26,7 +26,7 @@ type AggregateBundle struct {
26
26
func (ab * AggregateBundle ) aggregate () {}
27
27
28
28
// ConvertOption implements the Aggregate interface
29
- func (ab * AggregateBundle ) ConvertOption () option.Optioner { return nil }
29
+ func (ab * AggregateBundle ) ConvertOption () option.AggregateOptioner { return nil }
30
30
31
31
// BundleAggregate bundles Aggregate options
32
32
func BundleAggregate (opts ... Aggregate ) * AggregateBundle {
@@ -135,7 +135,7 @@ func (ab *AggregateBundle) bundleLength() int {
135
135
}
136
136
137
137
// Unbundle transforms a bundle into a slice of options, optionally deduplicating
138
- func (ab * AggregateBundle ) Unbundle (deduplicate bool ) ([]option.Optioner , error ) {
138
+ func (ab * AggregateBundle ) Unbundle (deduplicate bool ) ([]option.AggregateOptioner , error ) {
139
139
140
140
options , err := ab .unbundle ()
141
141
if err != nil {
@@ -166,14 +166,14 @@ func (ab *AggregateBundle) Unbundle(deduplicate bool) ([]option.Optioner, error)
166
166
}
167
167
168
168
// Helper that recursively unwraps bundle into slice of options
169
- func (ab * AggregateBundle ) unbundle () ([]option.Optioner , error ) {
169
+ func (ab * AggregateBundle ) unbundle () ([]option.AggregateOptioner , error ) {
170
170
if ab == nil {
171
171
return nil , nil
172
172
}
173
173
174
174
listLen := ab .bundleLength ()
175
175
176
- options := make ([]option.Optioner , listLen )
176
+ options := make ([]option.AggregateOptioner , listLen )
177
177
index := listLen - 1
178
178
179
179
for listHead := ab ; listHead != nil && listHead .option != nil ; listHead = listHead .next {
@@ -263,7 +263,7 @@ type OptAllowDiskUse option.OptAllowDiskUse
263
263
func (OptAllowDiskUse ) aggregate () {}
264
264
265
265
// ConvertOption implements the Aggregate interface
266
- func (opt OptAllowDiskUse ) ConvertOption () option.Optioner {
266
+ func (opt OptAllowDiskUse ) ConvertOption () option.AggregateOptioner {
267
267
return option .OptAllowDiskUse (opt )
268
268
}
269
269
@@ -273,15 +273,15 @@ type OptBatchSize option.OptBatchSize
273
273
func (OptBatchSize ) aggregate () {}
274
274
275
275
// ConvertOption implements the Aggregate interface
276
- func (opt OptBatchSize ) ConvertOption () option.Optioner {
276
+ func (opt OptBatchSize ) ConvertOption () option.AggregateOptioner {
277
277
return option .OptBatchSize (opt )
278
278
}
279
279
280
280
// OptBypassDocumentValidation allows the write to opt-out of document-level validation.
281
281
type OptBypassDocumentValidation option.OptBypassDocumentValidation
282
282
283
283
// ConvertOption implements the Aggregate interface
284
- func (opt OptBypassDocumentValidation ) ConvertOption () option.Optioner {
284
+ func (opt OptBypassDocumentValidation ) ConvertOption () option.AggregateOptioner {
285
285
return option .OptBypassDocumentValidation (opt )
286
286
}
287
287
@@ -293,7 +293,7 @@ type OptCollation option.OptCollation
293
293
func (OptCollation ) aggregate () {}
294
294
295
295
// ConvertOption implements the Aggregate interface
296
- func (opt OptCollation ) ConvertOption () option.Optioner {
296
+ func (opt OptCollation ) ConvertOption () option.AggregateOptioner {
297
297
return option .OptCollation (opt )
298
298
}
299
299
@@ -303,7 +303,7 @@ type OptMaxTime option.OptMaxTime
303
303
func (OptMaxTime ) aggregate () {}
304
304
305
305
// ConvertOption implements the Aggregate interface
306
- func (opt OptMaxTime ) ConvertOption () option.Optioner {
306
+ func (opt OptMaxTime ) ConvertOption () option.AggregateOptioner {
307
307
return option .OptMaxTime (opt )
308
308
}
309
309
@@ -313,7 +313,7 @@ type OptComment option.OptComment
313
313
func (OptComment ) aggregate () {}
314
314
315
315
// ConvertOption implements the Aggregate interface
316
- func (opt OptComment ) ConvertOption () option.Optioner {
316
+ func (opt OptComment ) ConvertOption () option.AggregateOptioner {
317
317
return option .OptComment (opt )
318
318
}
319
319
@@ -323,6 +323,6 @@ type OptHint option.OptHint
323
323
func (OptHint ) aggregate () {}
324
324
325
325
// ConvertOption implements the Aggregate interface
326
- func (opt OptHint ) ConvertOption () option.Optioner {
326
+ func (opt OptHint ) ConvertOption () option.AggregateOptioner {
327
327
return option .OptHint (opt )
328
328
}
0 commit comments