countopt

package
v0.0.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count interface {
	// contains filtered or unexported methods
}

Count represents all passable params for the count() function.

type CountBundle

type CountBundle struct {
	// contains filtered or unexported fields
}

CountBundle is a bundle of Count options

func BundleCount

func BundleCount(opts ...Count) *CountBundle

BundleCount bundles Count options

func (*CountBundle) Collation

func (cb *CountBundle) Collation(c *mongoopt.Collation) *CountBundle

Collation specifies a collation.

func (*CountBundle) ConvertCountOption

func (cb *CountBundle) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface

func (*CountBundle) Hint

func (cb *CountBundle) Hint(hint interface{}) *CountBundle

Hint adds an option to specify the index to use.

func (*CountBundle) Limit

func (cb *CountBundle) Limit(i int64) *CountBundle

Limit adds an option to limit the maximum number of documents to count.

func (*CountBundle) MaxTimeMs

func (cb *CountBundle) MaxTimeMs(i int32) *CountBundle

MaxTimeMs adds an option to specify the maximum amount of time to allow the operation to run.

func (*CountBundle) Skip

func (cb *CountBundle) Skip(i int64) *CountBundle

Skip adds an option to specify the number of documents to skip before counting.

func (*CountBundle) String

func (cb *CountBundle) String() string

String implements the Stringer interface

func (*CountBundle) Unbundle

func (cb *CountBundle) Unbundle(deduplicate bool) ([]option.CountOptioner, *session.Client, error)

Unbundle transforms a bundle into a slice of options, optionally deduplicating.

type CountOption added in v0.0.10

type CountOption interface {
	Count
	ConvertCountOption() option.CountOptioner
}

CountOption represents the options for the count() function.

type CountSession added in v0.0.10

type CountSession interface {
	Count
	ConvertCountSession() *session.Client
}

CountSession is the session for the count() function

type CountSessionOpt added in v0.0.10

type CountSessionOpt struct{}

CountSessionOpt is an count session option.

func (CountSessionOpt) ConvertCountSession added in v0.0.10

func (CountSessionOpt) ConvertCountSession() *session.Client

ConvertCountSession implements the CountSession interface.

type EstimatedDocumentCount added in v0.0.11

type EstimatedDocumentCount interface {
	// contains filtered or unexported methods
}

EstimatedDocumentCount represents all passable params for the estimatedDocumentCount() function

type EstimatedDocumentCountBundle added in v0.0.11

type EstimatedDocumentCountBundle struct {
	// contains filtered or unexported fields
}

EstimatedDocumentCountBundle is a bundle of EstimatedDocumentCount options

func BundleEstimatedDocumentCount added in v0.0.11

func BundleEstimatedDocumentCount(opts ...EstimatedDocumentCount) *EstimatedDocumentCountBundle

BundleEstimatedDocumentCount bundles EstimatedDocumentCount options

func (*EstimatedDocumentCountBundle) ConvertEstimateDocumentCountOption added in v0.0.11

func (cb *EstimatedDocumentCountBundle) ConvertEstimateDocumentCountOption() option.CountOptioner

ConvertEstimateDocumentCountOption implements the EstimatedDocumentCount interface

func (*EstimatedDocumentCountBundle) MaxTimeMs added in v0.0.11

MaxTimeMs adds an option to specify the maximum amount of time to allow the operation to run.

func (*EstimatedDocumentCountBundle) Unbundle added in v0.0.11

func (cb *EstimatedDocumentCountBundle) Unbundle(deduplicate bool) ([]option.CountOptioner, *session.Client, error)

Unbundle transforms a bundle into a slice of options, optionally deduplicating.

type EstimatedDocumentCountOption added in v0.0.11

type EstimatedDocumentCountOption interface {
	EstimatedDocumentCount
	ConvertEstimateDocumentCountOption() option.CountOptioner
}

EstimatedDocumentCountOption is options for the estimatedDocumentCount() function

type EstimatedDocumentCountSession added in v0.0.11

type EstimatedDocumentCountSession interface {
	EstimatedDocumentCount
	ConvertEstimateDocumentCountSession() *session.Client
}

EstimatedDocumentCountSession is the session for the estimatedDocumentCount() function

type OptCollation

type OptCollation option.OptCollation

OptCollation specifies a collation.

func Collation

func Collation(collation *mongoopt.Collation) OptCollation

Collation specifies a Collation.

func (OptCollation) ConvertCountOption

func (opt OptCollation) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface.

type OptHint

type OptHint option.OptHint

OptHint specifies the index to use.

func Hint

func Hint(hint interface{}) OptHint

Hint specifies the index to use.

func (OptHint) ConvertCountOption

func (opt OptHint) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface.

type OptLimit

type OptLimit option.OptLimit

OptLimit limits the maximum number of documents to count.

func Limit

func Limit(i int64) OptLimit

Limit limits the maximum number of documents to count.

func (OptLimit) ConvertCountOption

func (opt OptLimit) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface.

type OptMaxTimeMs

type OptMaxTimeMs option.OptMaxTime

OptMaxTimeMs specifies the maximum amount of time to allow the operation to run.

func MaxTimeMs

func MaxTimeMs(i int32) OptMaxTimeMs

MaxTimeMs specifies the maximum amount of time to allow the operation to run.

func (OptMaxTimeMs) ConvertCountOption

func (opt OptMaxTimeMs) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface.

func (OptMaxTimeMs) ConvertEstimateDocumentCountOption added in v0.0.11

func (opt OptMaxTimeMs) ConvertEstimateDocumentCountOption() option.CountOptioner

ConvertEstimateDocumentCountOption implements the Count interface.

type OptSkip

type OptSkip option.OptSkip

OptSkip specifies the number of documents to skip before counting.

func Skip

func Skip(i int64) OptSkip

Skip specifies the number of documents to skip before counting.

func (OptSkip) ConvertCountOption

func (opt OptSkip) ConvertCountOption() option.CountOptioner

ConvertCountOption implements the Count interface.

Jump to

Keyboard shortcuts

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