countopt

package
v0.0.0-...-ec4aec1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count interface {
	ConvertCountOption() option.CountOptioner
	// contains filtered or unexported methods
}

Count is options 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, error)

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

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.

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