Documentation ¶
Index ¶
- 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, error)
- type One
- type OneBundle
- type OptBypassDocumentValidation
- type OptOrdered
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Many ¶
type Many interface { ConvertInsertOption() option.InsertOptioner // contains filtered or unexported methods }
Many is options for InsertInsertMany
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, 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 One ¶
type One interface { ConvertInsertOption() option.InsertOptioner // contains filtered or unexported methods }
One is options for InsertInsertOne
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 ¶
func (ob *OneBundle) Unbundle(deduplicate bool) ([]option.InsertOptioner, 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 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