Documentation ¶
Index ¶
- type Count
- type CountBundle
- func (cb *CountBundle) Collation(c *mongoopt.Collation) *CountBundle
- func (cb *CountBundle) ConvertCountOption() option.CountOptioner
- func (cb *CountBundle) Hint(hint interface{}) *CountBundle
- func (cb *CountBundle) Limit(i int64) *CountBundle
- func (cb *CountBundle) MaxTimeMs(i int32) *CountBundle
- func (cb *CountBundle) Skip(i int64) *CountBundle
- func (cb *CountBundle) String() string
- func (cb *CountBundle) Unbundle(deduplicate bool) ([]option.CountOptioner, error)
- type OptCollation
- type OptHint
- type OptLimit
- type OptMaxTimeMs
- type OptSkip
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 (*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 ¶
OptHint specifies the index to use.
func (OptHint) ConvertCountOption ¶
func (opt OptHint) ConvertCountOption() option.CountOptioner
ConvertCountOption implements the Count interface.
type OptLimit ¶
OptLimit 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 ¶
OptSkip specifies the number of documents to skip before counting.
func (OptSkip) ConvertCountOption ¶
func (opt OptSkip) ConvertCountOption() option.CountOptioner
ConvertCountOption implements the Count interface.