updateopt

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 3 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 {
	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.

Jump to

Keyboard shortcuts

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