Documentation ¶
Index ¶
- type OptArrayFilters
- type OptBypassDocumentValidation
- type OptCollation
- type OptUpsert
- type Update
- type UpdateBundle
- func (ub *UpdateBundle) ArrayFilters(filter ...interface{}) *UpdateBundle
- func (ub *UpdateBundle) BypassDocumentValidation(b bool) *UpdateBundle
- func (ub *UpdateBundle) Collation(c *mongoopt.Collation) *UpdateBundle
- func (ub *UpdateBundle) ConvertUpdateOption() option.UpdateOptioner
- func (ub *UpdateBundle) String() string
- func (ub *UpdateBundle) Unbundle(deduplicate bool) ([]option.UpdateOptioner, error)
- func (ub *UpdateBundle) Upsert(b bool) *UpdateBundle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptArrayFilters ¶
type OptArrayFilters option.OptArrayFilters
OptArrayFilters specifies which array elements an update should apply.
func ArrayFilters ¶
func ArrayFilters(filter ...interface{}) OptArrayFilters
ArrayFilters specifies which array elements an update should apply.
func (OptArrayFilters) ConvertUpdateOption ¶
func (opt OptArrayFilters) ConvertUpdateOption() option.UpdateOptioner
ConvertUpdateOption implements the Update interface
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) ConvertUpdateOption ¶
func (opt OptBypassDocumentValidation) ConvertUpdateOption() option.UpdateOptioner
ConvertUpdateOption implements the Update 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) ConvertUpdateOption ¶
func (opt OptCollation) ConvertUpdateOption() option.UpdateOptioner
ConvertUpdateOption implements the Update interface.
type OptUpsert ¶
OptUpsert specifies whether to insert the document if it is not present.
func (OptUpsert) ConvertUpdateOption ¶
func (opt OptUpsert) ConvertUpdateOption() option.UpdateOptioner
ConvertUpdateOption implements the Update interface.
type Update ¶
type Update interface { ConvertUpdateOption() option.UpdateOptioner // contains filtered or unexported methods }
Update is options for the update() function
type UpdateBundle ¶
type UpdateBundle struct {
// contains filtered or unexported fields
}
UpdateBundle bundles One options
func BundleUpdate ¶
func BundleUpdate(opts ...Update) *UpdateBundle
BundleUpdate bundles Update options
func (*UpdateBundle) ArrayFilters ¶
func (ub *UpdateBundle) ArrayFilters(filter ...interface{}) *UpdateBundle
ArrayFilters adds an option to specify which array elements an update should apply.
func (*UpdateBundle) BypassDocumentValidation ¶
func (ub *UpdateBundle) BypassDocumentValidation(b bool) *UpdateBundle
BypassDocumentValidation adds an option to allow the write to opt-out of document-level validation.
func (*UpdateBundle) Collation ¶
func (ub *UpdateBundle) Collation(c *mongoopt.Collation) *UpdateBundle
Collation adds an option to specify a collation.
func (*UpdateBundle) ConvertUpdateOption ¶
func (ub *UpdateBundle) ConvertUpdateOption() option.UpdateOptioner
ConvertUpdateOption implements the Update interface
func (*UpdateBundle) String ¶
func (ub *UpdateBundle) String() string
String implements the Stringer interface
func (*UpdateBundle) Unbundle ¶
func (ub *UpdateBundle) Unbundle(deduplicate bool) ([]option.UpdateOptioner, error)
Unbundle transforms a bundle into a slice of options, optionally deduplicating
func (*UpdateBundle) Upsert ¶
func (ub *UpdateBundle) Upsert(b bool) *UpdateBundle
Upsert adds an option to specify whether to insert the document if it is not present.