mongo-drivergo.mongodb.org/mongo-driver/mongo/distinctopt Index | Files

package distinctopt

import "go.mongodb.org/mongo-driver/mongo/distinctopt"

Index

Types

type Distinct

type Distinct interface {
	ConvertDistinctOption() option.DistinctOptioner
	// contains filtered or unexported methods
}

Distinct is options for the distinct command.

type DistinctBundle

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

DistinctBundle is a bundle of Distinct options.

func BundleDistinct

func BundleDistinct(opts ...Distinct) *DistinctBundle

BundleDistinct bundles Distinct options.

func (*DistinctBundle) Collation

func (db *DistinctBundle) Collation(collation *mongoopt.Collation) *DistinctBundle

Collation adds an option to specify a collation.

func (*DistinctBundle) ConvertDistinctOption

func (db *DistinctBundle) ConvertDistinctOption() option.DistinctOptioner

ConvertDistinctOption implements the Distinct interface

func (*DistinctBundle) MaxTime

func (db *DistinctBundle) MaxTime(d time.Duration) *DistinctBundle

MaxTime adds an option to specify the maximum amount of time to allow the query to run.

func (*DistinctBundle) String

func (db *DistinctBundle) String() string

String implements the Stringer interface

func (*DistinctBundle) Unbundle

func (db *DistinctBundle) Unbundle(deduplicate bool) ([]option.DistinctOptioner, error)

Unbundle transofrms a bundle into a slice of DistinctOptioner, 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) ConvertDistinctOption

func (opt OptCollation) ConvertDistinctOption() option.DistinctOptioner

ConvertDistinctOption implements the Distinct 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 adds an optin to specify the maximum amount of time to allow the query to run.

func (OptMaxTime) ConvertDistinctOption

func (opt OptMaxTime) ConvertDistinctOption() option.DistinctOptioner

ConvertDistinctOption implements the Distinct interface.

Source Files

distinctopt.go

Version
v0.0.9
Published
Jul 10, 2018
Platform
linux/amd64
Imports
4 packages
Last checked
12 minutes ago

Tools for package owners.