distinctopt

package
v0.0.16 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distinct

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

Distinct represents all passable params for the distinct() function.

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, *session.Client, error)

Unbundle transofrms a bundle into a slice of DistinctOptioner, optionally deduplicating.

type DistinctOption added in v0.0.10

type DistinctOption interface {
	Distinct
	ConvertDistinctOption() option.DistinctOptioner
}

DistinctOption represents the options for the distinct() function.

type DistinctSession added in v0.0.10

type DistinctSession interface {
	Distinct
	ConvertDistinctSession() *session.Client
}

DistinctSession is the session for the distinct() function

type DistinctSessionOpt added in v0.0.10

type DistinctSessionOpt struct{}

DistinctSessionOpt is an distinct session option.

func (DistinctSessionOpt) ConvertDistinctSession added in v0.0.10

func (DistinctSessionOpt) ConvertDistinctSession() *session.Client

ConvertDistinctSession implements the DistinctSession interface.

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.

Jump to

Keyboard shortcuts

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