package indexopt
import "go.mongodb.org/mongo-driver/mongo/indexopt"
Index ¶
- type Create
- type CreateBundle
- func BundleCreate(opts ...Create) *CreateBundle
- func (cb *CreateBundle) ConvertCreateOption() option.CreateIndexesOptioner
- func (cb *CreateBundle) MaxTime(d time.Duration) *CreateBundle
- func (cb *CreateBundle) String() string
- func (cb *CreateBundle) Unbundle(deduplicate bool) ([]option.CreateIndexesOptioner, error)
- type Drop
- type DropBundle
- func BundleDrop(opts ...Drop) *DropBundle
- func (db *DropBundle) ConvertDropOption() option.DropIndexesOptioner
- func (db *DropBundle) MaxTime(d time.Duration) *DropBundle
- func (db *DropBundle) String() string
- func (db *DropBundle) Unbundle(deduplicate bool) ([]option.DropIndexesOptioner, error)
- type List
- type ListBundle
- func BundleList(opts ...List) *ListBundle
- func (lb *ListBundle) BatchSize(i int32) *ListBundle
- func (lb *ListBundle) ConvertListOption() option.ListIndexesOptioner
- func (lb *ListBundle) MaxTime(d time.Duration) *ListBundle
- func (lb *ListBundle) String() string
- func (lb *ListBundle) Unbundle(deduplicate bool) ([]option.ListIndexesOptioner, error)
- type OptBatchSize
- func BatchSize(i int32) OptBatchSize
- func (opt OptBatchSize) ConvertListOption() option.ListIndexesOptioner
- type OptMaxTime
Types ¶
type Create ¶
type Create interface { ConvertCreateOption() option.CreateIndexesOptioner // contains filtered or unexported methods }
Create is options for the createIndexes command.
type CreateBundle ¶
type CreateBundle struct {
// contains filtered or unexported fields
}
CreateBundle is a bundle of Create options
func BundleCreate ¶
func BundleCreate(opts ...Create) *CreateBundle
BundleCreate bundles Create options
func (*CreateBundle) ConvertCreateOption ¶
func (cb *CreateBundle) ConvertCreateOption() option.CreateIndexesOptioner
ConvertCreateOption implements the Create interface.
func (*CreateBundle) MaxTime ¶
func (cb *CreateBundle) MaxTime(d time.Duration) *CreateBundle
MaxTime adds an option to specify the maximum amount of time to allow the query to run.
func (*CreateBundle) String ¶
func (cb *CreateBundle) String() string
String implements the Stringer interface
func (*CreateBundle) Unbundle ¶
func (cb *CreateBundle) Unbundle(deduplicate bool) ([]option.CreateIndexesOptioner, error)
Unbundle unwinds and deduplicates the options used to create it and those added after creation into a single slice of options.
The deduplicate parameter is used to determine if the bundle is just flattened or if we actually deduplicate options.
type Drop ¶
type Drop interface { ConvertDropOption() option.DropIndexesOptioner // contains filtered or unexported methods }
Drop is options for the dropIndexes command.
type DropBundle ¶
type DropBundle struct {
// contains filtered or unexported fields
}
DropBundle is a bundle of Drop options
func BundleDrop ¶
func BundleDrop(opts ...Drop) *DropBundle
BundleDrop bundles Drop options
func (*DropBundle) ConvertDropOption ¶
func (db *DropBundle) ConvertDropOption() option.DropIndexesOptioner
ConvertDropOption implements the Drop interface
func (*DropBundle) MaxTime ¶
func (db *DropBundle) MaxTime(d time.Duration) *DropBundle
MaxTime adds an option to specify the maximum amount of time to allow the query to run.
func (*DropBundle) String ¶
func (db *DropBundle) String() string
String implements the Stringer interface
func (*DropBundle) Unbundle ¶
func (db *DropBundle) Unbundle(deduplicate bool) ([]option.DropIndexesOptioner, error)
Unbundle unwinds and deduplicates the options used to create it and those added after creation into a single slice of options.
The deduplicate parameter is used to determine if the bundle is just flattened or if we actually deduplicate options.
type List ¶
type List interface { ConvertListOption() option.ListIndexesOptioner // contains filtered or unexported methods }
List is options for the listIndexes command
type ListBundle ¶
type ListBundle struct {
// contains filtered or unexported fields
}
ListBundle is a bundle of List options.
func BundleList ¶
func BundleList(opts ...List) *ListBundle
BundleList bundles List options
func (*ListBundle) BatchSize ¶
func (lb *ListBundle) BatchSize(i int32) *ListBundle
BatchSize adds an option to specify the number of documents to return in every batch
func (*ListBundle) ConvertListOption ¶
func (lb *ListBundle) ConvertListOption() option.ListIndexesOptioner
ConvertListOption implements the List interface.
func (*ListBundle) MaxTime ¶
func (lb *ListBundle) MaxTime(d time.Duration) *ListBundle
MaxTime adds an option to specify the maximum amount of time to allow the query to run.
func (*ListBundle) String ¶
func (lb *ListBundle) String() string
String implements the Stringer interface
func (*ListBundle) Unbundle ¶
func (lb *ListBundle) Unbundle(deduplicate bool) ([]option.ListIndexesOptioner, error)
Unbundle unwinds and deduplicates the options used to create it and those added after creation into a single slice of options.
The deduplicate parameter is used to determine if the bundle is just flattened or if we actually deduplicate options.
type OptBatchSize ¶
type OptBatchSize option.OptBatchSize
OptBatchSize specifies the number of documents to return in every batch.
func BatchSize ¶
func BatchSize(i int32) OptBatchSize
BatchSize specifes the number of documents to return in each batch. List
func (OptBatchSize) ConvertListOption ¶
func (opt OptBatchSize) ConvertListOption() option.ListIndexesOptioner
ConvertListOption implements the List 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 specifies the amount of time to allow the query to run. Create, Drop, List
func (OptMaxTime) ConvertCreateOption ¶
func (opt OptMaxTime) ConvertCreateOption() option.CreateIndexesOptioner
ConvertCreateOption implements the Create interface.
func (OptMaxTime) ConvertDropOption ¶
func (opt OptMaxTime) ConvertDropOption() option.DropIndexesOptioner
ConvertDropOption implements the Drop interface.
func (OptMaxTime) ConvertListOption ¶
func (opt OptMaxTime) ConvertListOption() option.ListIndexesOptioner
ConvertListOption implements the List interface.
Source Files ¶
create.go drop.go indexopt.go list.go
- Version
- v0.0.9
- Published
- Jul 10, 2018
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 2 hours ago –
Tools for package owners.