updateopt

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type OptUpsert option.OptUpsert

OptUpsert specifies whether to insert the document if it is not present.

func Upsert

func Upsert(b bool) OptUpsert

Upsert 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 {
	// contains filtered or unexported methods
}

Update represents all passable params 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, *session.Client, 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.

type UpdateOption added in v0.0.10

type UpdateOption interface {
	Update
	ConvertUpdateOption() option.UpdateOptioner
}

UpdateOption represents the options for the update() function.

type UpdateSession added in v0.0.10

type UpdateSession interface {
	Update
	ConvertUpdateSession() *session.Client
}

UpdateSession is the session for the update() function

type UpdateSessionOpt added in v0.0.10

type UpdateSessionOpt struct{}

UpdateSessionOpt is an update session option.

func (UpdateSessionOpt) ConvertUpdateSession added in v0.0.10

func (UpdateSessionOpt) ConvertUpdateSession() *session.Client

ConvertUpdateSession implements the UpdateSession interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL