Documentation ¶
Index ¶
- type InsertSessionOpt
- type Many
- type ManyBundle
- func (mb *ManyBundle) BypassDocumentValidation(b bool) *ManyBundle
- func (mb *ManyBundle) ConvertInsertOption() option.InsertOptioner
- func (mb *ManyBundle) Ordered(b bool) *ManyBundle
- func (mb *ManyBundle) String() string
- func (mb *ManyBundle) Unbundle(deduplicate bool) ([]option.InsertOptioner, *session.Client, error)
- type ManyOption
- type ManySession
- type One
- type OneBundle
- type OneOption
- type OneSession
- type OptBypassDocumentValidation
- type OptOrdered
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertSessionOpt ¶ added in v0.0.10
type InsertSessionOpt struct{}
InsertSessionOpt is a one,many session option.
func (InsertSessionOpt) ConvertInsertSession ¶ added in v0.0.10
func (opt InsertSessionOpt) ConvertInsertSession() *session.Client
ConvertInsertSession implements the InsertSession interface.
type Many ¶
type Many interface {
// contains filtered or unexported methods
}
Many represents all passable params for the insertMany() function.
type ManyBundle ¶
type ManyBundle struct {
// contains filtered or unexported fields
}
ManyBundle is a bundle of InsertInsertMany options
func (*ManyBundle) BypassDocumentValidation ¶
func (mb *ManyBundle) BypassDocumentValidation(b bool) *ManyBundle
BypassDocumentValidation adds an option allowing the write to opt-out of the document-level validation.
func (*ManyBundle) ConvertInsertOption ¶
func (mb *ManyBundle) ConvertInsertOption() option.InsertOptioner
ConvertInsertOption implements the Many interface
func (*ManyBundle) Ordered ¶
func (mb *ManyBundle) Ordered(b bool) *ManyBundle
Ordered adds an option that if true and insert fails, returns without performing remaining writes, otherwise continues
func (*ManyBundle) String ¶
func (mb *ManyBundle) String() string
String implements the Stringer interface
func (*ManyBundle) Unbundle ¶
func (mb *ManyBundle) Unbundle(deduplicate bool) ([]option.InsertOptioner, *session.Client, 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.
Since a bundle can be recursive, this method will unwind all recursive bundles.
type ManyOption ¶ added in v0.0.10
type ManyOption interface { Many ConvertInsertOption() option.InsertOptioner }
ManyOption represents the options for the insertMany() function.
type ManySession ¶ added in v0.0.10
ManySession is the session for the insertMany() function
type One ¶
type One interface {
// contains filtered or unexported methods
}
One represents all passable params for the insertOne() function.
type OneBundle ¶
type OneBundle struct {
// contains filtered or unexported fields
}
OneBundle is a bundle of One options
func (*OneBundle) BypassDocumentValidation ¶
BypassDocumentValidation adds an option allowing the write to opt-out of the document-level validation.
func (*OneBundle) ConvertInsertOption ¶
func (ob *OneBundle) ConvertInsertOption() option.InsertOptioner
ConvertInsertOption implements the One interface
func (*OneBundle) Unbundle ¶
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.
Since a bundle can be recursive, this method will unwind all recursive bundles.
type OneOption ¶ added in v0.0.10
type OneOption interface { One ConvertInsertOption() option.InsertOptioner }
OneOption represents the options for the insertOne() function.
type OneSession ¶ added in v0.0.10
OneSession is the session for the insertOne() function
type OptBypassDocumentValidation ¶
type OptBypassDocumentValidation option.OptBypassDocumentValidation
OptBypassDocumentValidation allows the write to opt-out of the document-level validation.
func BypassDocumentValidation ¶
func BypassDocumentValidation(b bool) OptBypassDocumentValidation
BypassDocumentValidation allows the write to opt-out of the document-level validation.
func (OptBypassDocumentValidation) ConvertInsertOption ¶
func (opt OptBypassDocumentValidation) ConvertInsertOption() option.InsertOptioner
ConvertInsertOption implements the One,Many interface
type OptOrdered ¶
type OptOrdered option.OptOrdered
OptOrdered if true and insert fails, returns without performing remaining writes, otherwise continues
func Ordered ¶
func Ordered(b bool) OptOrdered
Ordered if true and insert fails, returns without performing remaining writes, otherwise continues
func (OptOrdered) ConvertInsertOption ¶
func (opt OptOrdered) ConvertInsertOption() option.InsertOptioner
ConvertInsertOption implements the Many interface