Documentation ¶
Index ¶
- type Aggregate
- type AggregateBundle
- func (ab *AggregateBundle) AllowDiskUse(b bool) *AggregateBundle
- func (ab *AggregateBundle) BatchSize(i int32) *AggregateBundle
- func (ab *AggregateBundle) BypassDocumentValidation(b bool) *AggregateBundle
- func (ab *AggregateBundle) Collation(c *mongoopt.Collation) *AggregateBundle
- func (ab *AggregateBundle) Comment(s string) *AggregateBundle
- func (ab *AggregateBundle) ConvertAggregateOption() option.AggregateOptioner
- func (ab *AggregateBundle) Hint(hint interface{}) *AggregateBundle
- func (ab *AggregateBundle) MaxAwaitTime(d time.Duration) *AggregateBundle
- func (ab *AggregateBundle) MaxTime(d time.Duration) *AggregateBundle
- func (ab *AggregateBundle) String() string
- func (ab *AggregateBundle) Unbundle(deduplicate bool) ([]option.AggregateOptioner, *session.Client, error)
- type AggregateOption
- type AggregateSession
- type AggregateSessionOpt
- type OptAllowDiskUse
- type OptBatchSize
- type OptBypassDocumentValidation
- type OptCollation
- type OptComment
- type OptHint
- type OptMaxAwaitTime
- type OptMaxTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶
type Aggregate interface {
// contains filtered or unexported methods
}
Aggregate represents all passable params for the aggregate() function.
type AggregateBundle ¶
type AggregateBundle struct {
// contains filtered or unexported fields
}
AggregateBundle is a bundle of Aggregate options
func BundleAggregate ¶
func BundleAggregate(opts ...Aggregate) *AggregateBundle
BundleAggregate bundles Aggregate options
func (*AggregateBundle) AllowDiskUse ¶
func (ab *AggregateBundle) AllowDiskUse(b bool) *AggregateBundle
AllowDiskUse adds an option to allow aggregation stages to write to temporary files.
func (*AggregateBundle) BatchSize ¶
func (ab *AggregateBundle) BatchSize(i int32) *AggregateBundle
BatchSize adds an option to specify the number of documents to return in every batch.
func (*AggregateBundle) BypassDocumentValidation ¶
func (ab *AggregateBundle) BypassDocumentValidation(b bool) *AggregateBundle
BypassDocumentValidation adds an option to allow the write to opt-out of document-level validation.
func (*AggregateBundle) Collation ¶
func (ab *AggregateBundle) Collation(c *mongoopt.Collation) *AggregateBundle
Collation adds an option to specify a Collation.
func (*AggregateBundle) Comment ¶
func (ab *AggregateBundle) Comment(s string) *AggregateBundle
Comment adds an option to specify a string to help trace the operation through the database profiler, currentOp, and logs.
func (*AggregateBundle) ConvertAggregateOption ¶
func (ab *AggregateBundle) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
func (*AggregateBundle) Hint ¶
func (ab *AggregateBundle) Hint(hint interface{}) *AggregateBundle
Hint adds an option to specify the index to use for the aggregation.
func (*AggregateBundle) MaxAwaitTime ¶ added in v0.0.15
func (ab *AggregateBundle) MaxAwaitTime(d time.Duration) *AggregateBundle
MaxAwaitTime adds an option to specify the maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query
func (*AggregateBundle) MaxTime ¶
func (ab *AggregateBundle) MaxTime(d time.Duration) *AggregateBundle
MaxTime adds an option to specify the maximum amount of time to allow the query to run.
func (*AggregateBundle) String ¶
func (ab *AggregateBundle) String() string
String implements the Stringer interface
func (*AggregateBundle) Unbundle ¶
func (ab *AggregateBundle) Unbundle(deduplicate bool) ([]option.AggregateOptioner, *session.Client, error)
Unbundle transforms a bundle into a slice of options, optionally deduplicating
type AggregateOption ¶ added in v0.0.10
type AggregateOption interface { Aggregate ConvertAggregateOption() option.AggregateOptioner }
AggregateOption represents the options for the aggregate() function.
type AggregateSession ¶ added in v0.0.10
AggregateSession is the session for the aggregate() function
type AggregateSessionOpt ¶ added in v0.0.10
type AggregateSessionOpt struct{}
AggregateSessionOpt is an aggregate session option.
func (AggregateSessionOpt) ConvertAggregateSession ¶ added in v0.0.10
func (AggregateSessionOpt) ConvertAggregateSession() *session.Client
ConvertAggregateSession implements the AggregateSession interface.
type OptAllowDiskUse ¶
type OptAllowDiskUse option.OptAllowDiskUse
OptAllowDiskUse allows aggregation stages to write to temporary files.
func AllowDiskUse ¶
func AllowDiskUse(b bool) OptAllowDiskUse
AllowDiskUse allows aggregation stages to write to temporary files.
func (OptAllowDiskUse) ConvertAggregateOption ¶
func (opt OptAllowDiskUse) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptBatchSize ¶
type OptBatchSize option.OptBatchSize
OptBatchSize specifies the number of documents to return in every batch.
func BatchSize ¶
func BatchSize(i int32) OptBatchSize
BatchSize specifies the number of documents to return in every batch.
func (OptBatchSize) ConvertAggregateOption ¶
func (opt OptBatchSize) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptBypassDocumentValidation ¶
type OptBypassDocumentValidation option.OptBypassDocumentValidation
OptBypassDocumentValidation allows the write to opt-out of document-level validation.
func BypassDocumentValidation ¶
func BypassDocumentValidation(b bool) OptBypassDocumentValidation
BypassDocumentValidation allows the write to opt-out of document-level validation.
func (OptBypassDocumentValidation) ConvertAggregateOption ¶
func (opt OptBypassDocumentValidation) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptCollation ¶
type OptCollation option.OptCollation
OptCollation specifies a collation.
func Collation ¶
func Collation(c *mongoopt.Collation) OptCollation
Collation specifies a collation.
func (OptCollation) ConvertAggregateOption ¶
func (opt OptCollation) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptComment ¶
type OptComment option.OptComment
OptComment allows users to specify a string to help trace the operation through the database profiler, currentOp, and logs.
func Comment ¶
func Comment(s string) OptComment
Comment allows users to specify a string to help trace the operation through the database profiler, currentOp, and logs.
func (OptComment) ConvertAggregateOption ¶
func (opt OptComment) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptHint ¶
OptHint specifies the index to use for the aggregation.
func Hint ¶
func Hint(hint interface{}) OptHint
Hint specifies the index to use for the aggregation.
func (OptHint) ConvertAggregateOption ¶
func (opt OptHint) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptMaxAwaitTime ¶ added in v0.0.15
type OptMaxAwaitTime option.OptMaxAwaitTime
OptMaxAwaitTime specifies the maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query
func MaxAwaitTime ¶ added in v0.0.15
func MaxAwaitTime(d time.Duration) OptMaxAwaitTime
MaxAwaitTime specifies the maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query
func (OptMaxAwaitTime) ConvertAggregateOption ¶ added in v0.0.15
func (opt OptMaxAwaitTime) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface
type OptMaxTime ¶
type OptMaxTime option.OptMaxTime
OptMaxTime specifies the maximum amount of time to allow the query to run.
func MaxTime ¶
func MaxTime(d time.Duration) OptMaxTime
MaxTime specifies the maximum amount of time to allow the query to run.
func (OptMaxTime) ConvertAggregateOption ¶
func (opt OptMaxTime) ConvertAggregateOption() option.AggregateOptioner
ConvertAggregateOption implements the Aggregate interface