replaceopt

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 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 {
	// contains filtered or unexported methods
}

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

type ReplaceOption added in v0.0.10

type ReplaceOption interface {
	Replace
	ConvertReplaceOption() option.ReplaceOptioner
}

ReplaceOption represents the options for the replace() function.

type ReplaceSession added in v0.0.10

type ReplaceSession interface {
	Replace
	ConvertReplaceSession() *session.Client
}

ReplaceSession is the session for the replace() function

type ReplaceSessionOpt added in v0.0.10

type ReplaceSessionOpt struct{}

ReplaceSessionOpt is an replace session option.

func (ReplaceSessionOpt) ConvertReplaceSession added in v0.0.10

func (ReplaceSessionOpt) ConvertReplaceSession() *session.Client

ConvertReplaceSession implements the ReplaceSession interface.

Jump to

Keyboard shortcuts

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