replaceopt

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 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

type OptUpsert option.OptUpsert

OptUpsert specifies whether to insert a new document if it does not exist

func Upsert

func Upsert(b bool) OptUpsert

Upsert 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

Jump to

Keyboard shortcuts

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