Documentation ¶
Index ¶
- type OptBypassDocumentValidation
- type OptCollation
- type OptUpsert
- type Replace
- type ReplaceBundle
- func (rb *ReplaceBundle) BypassDocumentValidation(b bool) *ReplaceBundle
- func (rb *ReplaceBundle) Collation(c *mongoopt.Collation) *ReplaceBundle
- func (rb *ReplaceBundle) ConvertReplaceOption() option.ReplaceOptioner
- func (rb *ReplaceBundle) String() string
- func (rb *ReplaceBundle) Unbundle(deduplicate bool) ([]option.ReplaceOptioner, error)
- func (rb *ReplaceBundle) Upsert(b bool) *ReplaceBundle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptBypassDocumentValidation ¶
type OptBypassDocumentValidation option.OptBypassDocumentValidation
OptBypassDocumentValidation allows the write to opt-out of document-level validation.
func BypassDocumentValidation ¶
func BypassDocumentValidation(b bool) OptBypassDocumentValidation
BypassDocumentValidation allows the write to opt-out of document-level validation.
func (OptBypassDocumentValidation) ConvertReplaceOption ¶
func (opt OptBypassDocumentValidation) ConvertReplaceOption() option.ReplaceOptioner
ConvertReplaceOption implements the Replace interface
type OptCollation ¶
type OptCollation option.OptCollation
OptCollation specifies a Collation.
func Collation ¶
func Collation(c *mongoopt.Collation) OptCollation
Collation specifies a Collation.
func (OptCollation) ConvertReplaceOption ¶
func (opt OptCollation) ConvertReplaceOption() option.ReplaceOptioner
ConvertReplaceOption implements the replace interface
type OptUpsert ¶
OptUpsert specifies whether to insert a new document if it does not exist
func (OptUpsert) ConvertReplaceOption ¶
func (opt OptUpsert) ConvertReplaceOption() option.ReplaceOptioner
ConvertReplaceOption implements the Replace interface
type Replace ¶
type Replace interface { ConvertReplaceOption() option.ReplaceOptioner // contains filtered or unexported methods }
Replace is options for the replace() function
type ReplaceBundle ¶
type ReplaceBundle struct {
// contains filtered or unexported fields
}
ReplaceBundle is a bundle of Replace options
func BundleReplace ¶
func BundleReplace(opts ...Replace) *ReplaceBundle
BundleReplace bundles Replace options
func (*ReplaceBundle) BypassDocumentValidation ¶
func (rb *ReplaceBundle) BypassDocumentValidation(b bool) *ReplaceBundle
BypassDocumentValidation adds an option to allow the write to opt-out of document-level validation.
func (*ReplaceBundle) Collation ¶
func (rb *ReplaceBundle) Collation(c *mongoopt.Collation) *ReplaceBundle
Collation adds an option to specify a Collation.
func (*ReplaceBundle) ConvertReplaceOption ¶
func (rb *ReplaceBundle) ConvertReplaceOption() option.ReplaceOptioner
ConvertReplaceOption implements the Replace interface
func (*ReplaceBundle) String ¶
func (rb *ReplaceBundle) String() string
String implements the Stringer interface.
func (*ReplaceBundle) Unbundle ¶
func (rb *ReplaceBundle) Unbundle(deduplicate bool) ([]option.ReplaceOptioner, error)
Unbundle transforms a bundle into a slice of options, optionally deduplicating
func (*ReplaceBundle) Upsert ¶
func (rb *ReplaceBundle) Upsert(b bool) *ReplaceBundle
Upsert adds an option to specify whether to insert a new document if it does not exist