package countopt
import "go.mongodb.org/mongo-driver/mongo/countopt"
Index ¶
- type Count
- type CountBundle
- func BundleCount(opts ...Count) *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, *session.Client, error)
- type CountOption
- type CountSession
- type CountSessionOpt
- type EstimatedDocumentCount
- type EstimatedDocumentCountBundle
- func BundleEstimatedDocumentCount(opts ...EstimatedDocumentCount) *EstimatedDocumentCountBundle
- func (cb *EstimatedDocumentCountBundle) ConvertEstimateDocumentCountOption() option.CountOptioner
- func (cb *EstimatedDocumentCountBundle) MaxTimeMs(i int32) *EstimatedDocumentCountBundle
- func (cb *EstimatedDocumentCountBundle) Unbundle(deduplicate bool) ([]option.CountOptioner, *session.Client, error)
- type EstimatedDocumentCountOption
- type EstimatedDocumentCountSession
- type OptCollation
- func Collation(collation *mongoopt.Collation) OptCollation
- func (opt OptCollation) ConvertCountOption() option.CountOptioner
- type OptHint
- type OptLimit
- type OptMaxTimeMs
- func MaxTimeMs(i int32) OptMaxTimeMs
- func (opt OptMaxTimeMs) ConvertCountOption() option.CountOptioner
- func (opt OptMaxTimeMs) ConvertEstimateDocumentCountOption() option.CountOptioner
- type OptSkip
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 ¶
type CountOption interface { Count ConvertCountOption() option.CountOptioner }
CountOption represents the options for the count() function.
type CountSession ¶
CountSession is the session for the count() function
type CountSessionOpt ¶
type CountSessionOpt struct{}
CountSessionOpt is an count session option.
func (CountSessionOpt) ConvertCountSession ¶
func (CountSessionOpt) ConvertCountSession() *session.Client
ConvertCountSession implements the CountSession interface.
type EstimatedDocumentCount ¶
type EstimatedDocumentCount interface {
// contains filtered or unexported methods
}
EstimatedDocumentCount represents all passable params for the estimatedDocumentCount() function
type EstimatedDocumentCountBundle ¶
type EstimatedDocumentCountBundle struct {
// contains filtered or unexported fields
}
EstimatedDocumentCountBundle is a bundle of EstimatedDocumentCount options
func BundleEstimatedDocumentCount ¶
func BundleEstimatedDocumentCount(opts ...EstimatedDocumentCount) *EstimatedDocumentCountBundle
BundleEstimatedDocumentCount bundles EstimatedDocumentCount options
func (*EstimatedDocumentCountBundle) ConvertEstimateDocumentCountOption ¶
func (cb *EstimatedDocumentCountBundle) ConvertEstimateDocumentCountOption() option.CountOptioner
ConvertEstimateDocumentCountOption implements the EstimatedDocumentCount interface
func (*EstimatedDocumentCountBundle) MaxTimeMs ¶
func (cb *EstimatedDocumentCountBundle) MaxTimeMs(i int32) *EstimatedDocumentCountBundle
MaxTimeMs adds an option to specify the maximum amount of time to allow the operation to run.
func (*EstimatedDocumentCountBundle) Unbundle ¶
func (cb *EstimatedDocumentCountBundle) Unbundle(deduplicate bool) ([]option.CountOptioner, *session.Client, error)
Unbundle transforms a bundle into a slice of options, optionally deduplicating.
type EstimatedDocumentCountOption ¶
type EstimatedDocumentCountOption interface { EstimatedDocumentCount ConvertEstimateDocumentCountOption() option.CountOptioner }
EstimatedDocumentCountOption is options for the estimatedDocumentCount() function
type EstimatedDocumentCountSession ¶
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 ¶
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 ¶
OptLimit limits the maximum number of documents to count.
func Limit ¶
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 ¶
func (opt OptMaxTimeMs) ConvertEstimateDocumentCountOption() option.CountOptioner
ConvertEstimateDocumentCountOption implements the Count interface.
type OptSkip ¶
OptSkip specifies the number of documents to skip before counting.
func Skip ¶
Skip specifies the number of documents to skip before counting.
func (OptSkip) ConvertCountOption ¶
func (opt OptSkip) ConvertCountOption() option.CountOptioner
ConvertCountOption implements the Count interface.
Source Files ¶
countopt.go etimatedcountopt.go
- Version
- v0.0.14
- Published
- Sep 20, 2018
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 46 minutes ago –
Tools for package owners.