aggregateopt

package
v0.0.3-0...-630480d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

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

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

type AggregateOption interface {
	Aggregate
	ConvertAggregateOption() option.AggregateOptioner
}

AggregateOption represents the options for the aggregate() function.

type AggregateSession

type AggregateSession interface {
	Aggregate
	ConvertAggregateSession() *session.Client
}

AggregateSession is the session for the aggregate() function

type AggregateSessionOpt

type AggregateSessionOpt struct{}

AggregateSessionOpt is an aggregate session option.

func (AggregateSessionOpt) ConvertAggregateSession

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

type OptHint option.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

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL