Documentation ¶
Index ¶
- type OptBypassDocumentValidation
- type OptCollation
- type OptUpsert
- type Replace
- type ReplaceBundle
- func (rb *ReplaceBundle) BypassDocumentValidation(b bool) *ReplaceBundle
- func (rb *ReplaceBundle) Collation(c *mongoopt.Collation) *ReplaceBundle
- func (rb *ReplaceBundle) ConvertReplaceOption() option.ReplaceOptioner
- func (rb *ReplaceBundle) String() string
- func (rb *ReplaceBundle) Unbundle(deduplicate bool) ([]option.ReplaceOptioner, *session.Client, error)
- func (rb *ReplaceBundle) Upsert(b bool) *ReplaceBundle
- type ReplaceOption
- type ReplaceSession
- type ReplaceSessionOpt
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 ¶
OptUpsert 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
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.