package replaceopt
import "go.mongodb.org/mongo-driver/mongo/replaceopt"
Index ¶
- type OptBypassDocumentValidation
- func BypassDocumentValidation(b bool) OptBypassDocumentValidation
- func (opt OptBypassDocumentValidation) ConvertReplaceOption() option.ReplaceOptioner
- type OptCollation
- func Collation(c *mongoopt.Collation) OptCollation
- func (opt OptCollation) ConvertReplaceOption() option.ReplaceOptioner
- type OptUpsert
- type Replace
- type ReplaceBundle
- func BundleReplace(opts ...Replace) *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
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 Upsert ¶
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 ¶
type ReplaceOption interface { Replace ConvertReplaceOption() option.ReplaceOptioner }
ReplaceOption represents the options for the replace() function.
type ReplaceSession ¶
ReplaceSession is the session for the replace() function
type ReplaceSessionOpt ¶
type ReplaceSessionOpt struct{}
ReplaceSessionOpt is an replace session option.
func (ReplaceSessionOpt) ConvertReplaceSession ¶
func (ReplaceSessionOpt) ConvertReplaceSession() *session.Client
ConvertReplaceSession implements the ReplaceSession interface.
Source Files ¶
replaceopt.go
- Version
- v0.0.15
- Published
- Sep 27, 2018
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 2 hours ago –
Tools for package owners.