Documentation
¶
Overview ¶
Package mongodriver implements a MongoDB driver for the Grove ORM.
Unlike the SQL-based drivers (pgdriver, mysqldriver), this driver uses MongoDB-native BSON operations (Find, InsertOne, UpdateOne, DeleteOne, Aggregate) instead of SQL query builders. It implements grove.GroveDriver and the adapter interfaces (txBeginner, queryBuilder) so that it integrates with the top-level grove.DB handle.
Usage:
mdb := mongodriver.New()
err := mdb.Open(ctx, "mongodb://localhost:27017/mydb")
db, err := grove.Open(mdb)
// Typed access via Unwrap:
mongo := mongodriver.Unwrap(db)
mongo.NewFind(&users).Filter(bson.M{"role": "admin"}).Scan(ctx)
Index ¶
- Variables
- func DateTimeFromTime(t time.Time) bson.DateTime
- func IsValidObjectID(s string) bool
- func NowDateTime() bson.DateTime
- type A
- type AggregateQuery
- func (q *AggregateQuery) GetCollection() string
- func (q *AggregateQuery) GetPipeline() bson.A
- func (q *AggregateQuery) Group(group bson.M) *AggregateQuery
- func (q *AggregateQuery) Limit(n int64) *AggregateQuery
- func (q *AggregateQuery) Lookup(lookup bson.M) *AggregateQuery
- func (q *AggregateQuery) Match(filter bson.M) *AggregateQuery
- func (q *AggregateQuery) Project(projection bson.M) *AggregateQuery
- func (q *AggregateQuery) Scan(ctx context.Context, dest any) error
- func (q *AggregateQuery) Skip(n int64) *AggregateQuery
- func (q *AggregateQuery) Sort(sort bson.D) *AggregateQuery
- func (q *AggregateQuery) Stage(stage bson.M) *AggregateQuery
- func (q *AggregateQuery) Unwind(path string) *AggregateQuery
- type CreateCollectionQuery
- func (q *CreateCollectionQuery) AdditionalProperties(allow bool) *CreateCollectionQuery
- func (q *CreateCollectionQuery) BuildSchema() (bson.M, error)
- func (q *CreateCollectionQuery) Collection(name string) *CreateCollectionQuery
- func (q *CreateCollectionQuery) Exec(ctx context.Context) error
- func (q *CreateCollectionQuery) GetCollection() string
- func (q *CreateCollectionQuery) IfNotExists() *CreateCollectionQuery
- func (q *CreateCollectionQuery) ValidationAction(action string) *CreateCollectionQuery
- func (q *CreateCollectionQuery) ValidationLevel(level string) *CreateCollectionQuery
- type D
- type DeleteQuery
- func (q *DeleteQuery) Collection(name string) *DeleteQuery
- func (q *DeleteQuery) Exec(ctx context.Context) (*mongoResult, error)
- func (q *DeleteQuery) Filter(f bson.M) *DeleteQuery
- func (q *DeleteQuery) GetCollection() string
- func (q *DeleteQuery) GetFilter() bson.M
- func (q *DeleteQuery) IsMany() bool
- func (q *DeleteQuery) Many() *DeleteQuery
- type DropCollectionQuery
- type E
- type FindQuery
- func (q *FindQuery) Collection(name string) *FindQuery
- func (q *FindQuery) Count(ctx context.Context) (int64, error)
- func (q *FindQuery) Filter(f bson.M) *FindQuery
- func (q *FindQuery) GetCollection() string
- func (q *FindQuery) GetFilter() bson.M
- func (q *FindQuery) GetLimit() int64
- func (q *FindQuery) GetProjection() bson.M
- func (q *FindQuery) GetSkip() int64
- func (q *FindQuery) GetSort() bson.D
- func (q *FindQuery) Limit(n int64) *FindQuery
- func (q *FindQuery) Project(p bson.M) *FindQuery
- func (q *FindQuery) Scan(ctx context.Context) error
- func (q *FindQuery) Skip(n int64) *FindQuery
- func (q *FindQuery) Sort(s bson.D) *FindQuery
- type InsertQuery
- type M
- type MongoDB
- func (db *MongoDB) Client() *mongo.Client
- func (db *MongoDB) Close() error
- func (db *MongoDB) Collection(name string) *mongo.Collection
- func (db *MongoDB) Database() *mongo.Database
- func (db *MongoDB) DatabaseName() string
- func (db *MongoDB) GroveDelete(model any) any
- func (db *MongoDB) GroveInsert(model any) any
- func (db *MongoDB) GroveSelect(model ...any) any
- func (db *MongoDB) GroveTx(ctx context.Context, isolationLevel int, readOnly bool) (any, error)
- func (db *MongoDB) GroveUpdate(model any) any
- func (db *MongoDB) Name() string
- func (db *MongoDB) NewAggregate(collection string) *AggregateQuery
- func (db *MongoDB) NewCreateCollection(model any) *CreateCollectionQuery
- func (db *MongoDB) NewDelete(model any) *DeleteQuery
- func (db *MongoDB) NewDropCollection(model any) *DropCollectionQuery
- func (db *MongoDB) NewFind(model ...any) *FindQuery
- func (db *MongoDB) NewInsert(model any) *InsertQuery
- func (db *MongoDB) NewUpdate(model any) *UpdateQuery
- func (db *MongoDB) Open(ctx context.Context, uri string, opts ...MongoOption) error
- func (db *MongoDB) Ping(ctx context.Context) error
- func (db *MongoDB) SetHooks(engine *hook.Engine)
- type MongoOption
- func WithConnectTimeout(d time.Duration) MongoOption
- func WithDatabase(name string) MongoOption
- func WithMaxConnIdleTime(d time.Duration) MongoOption
- func WithMaxConnecting(n uint64) MongoOption
- func WithMaxPoolSize(n uint64) MongoOption
- func WithMinPoolSize(n uint64) MongoOption
- func WithPingRetries(n int) MongoOption
- func WithPingRetryBackoff(d time.Duration) MongoOption
- func WithPingTimeout(d time.Duration) MongoOption
- func WithServerSelectionTimeout(d time.Duration) MongoOption
- func WithSkipPing(skip bool) MongoOption
- func WithTimeout(d time.Duration) MongoOption
- type MongoTx
- func (tx *MongoTx) Commit() error
- func (tx *MongoTx) DB() *MongoDB
- func (tx *MongoTx) NewDelete(model any) *DeleteQuery
- func (tx *MongoTx) NewFind(model ...any) *FindQuery
- func (tx *MongoTx) NewInsert(model any) *InsertQuery
- func (tx *MongoTx) NewUpdate(model any) *UpdateQuery
- func (tx *MongoTx) Rollback() error
- func (tx *MongoTx) Session() *mongo.Session
- func (tx *MongoTx) SessionContext(ctx context.Context) context.Context
- type ObjectID
- type Timestamp
- type UpdateQuery
- func (q *UpdateQuery) Collection(name string) *UpdateQuery
- func (q *UpdateQuery) Exec(ctx context.Context) (*mongoResult, error)
- func (q *UpdateQuery) Filter(f bson.M) *UpdateQuery
- func (q *UpdateQuery) GetCollection() string
- func (q *UpdateQuery) GetFilter() bson.M
- func (q *UpdateQuery) GetUpdate() bson.M
- func (q *UpdateQuery) IsMany() bool
- func (q *UpdateQuery) IsUpsert() bool
- func (q *UpdateQuery) Many() *UpdateQuery
- func (q *UpdateQuery) Set(field string, value any) *UpdateQuery
- func (q *UpdateQuery) SetUpdate(update bson.M) *UpdateQuery
- func (q *UpdateQuery) Upsert() *UpdateQuery
Constants ¶
This section is empty.
Variables ¶
var ErrLastInsertIDNotSupported = errors.New("mongodriver: LastInsertId is not supported; use InsertedID() instead")
ErrLastInsertIDNotSupported is returned by mongoResult.LastInsertId because MongoDB does not use auto-incrementing integer IDs by default. Use the InsertedID field to get the generated ObjectID instead.
var ErrNotSupported = errors.New("mongodriver: operation not supported")
ErrNotSupported is returned for operations that are not applicable to MongoDB.
Functions ¶
func DateTimeFromTime ¶
DateTimeFromTime converts a Go time.Time to a bson.DateTime.
func IsValidObjectID ¶
IsValidObjectID returns true if the hex string is a valid 24-character ObjectID.
func NowDateTime ¶
NowDateTime returns the current time as a bson.DateTime.
Types ¶
type AggregateQuery ¶
type AggregateQuery struct {
// contains filtered or unexported fields
}
AggregateQuery builds and executes MongoDB aggregation pipelines. Use MongoDB.NewAggregate() to create one.
func (*AggregateQuery) GetCollection ¶
func (q *AggregateQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
func (*AggregateQuery) GetPipeline ¶
func (q *AggregateQuery) GetPipeline() bson.A
GetPipeline returns the current aggregation pipeline. Useful for testing.
func (*AggregateQuery) Group ¶
func (q *AggregateQuery) Group(group bson.M) *AggregateQuery
Group adds a $group stage to the pipeline.
func (*AggregateQuery) Limit ¶
func (q *AggregateQuery) Limit(n int64) *AggregateQuery
Limit adds a $limit stage to the pipeline.
func (*AggregateQuery) Lookup ¶
func (q *AggregateQuery) Lookup(lookup bson.M) *AggregateQuery
Lookup adds a $lookup stage to the pipeline.
func (*AggregateQuery) Match ¶
func (q *AggregateQuery) Match(filter bson.M) *AggregateQuery
Match adds a $match stage to the pipeline.
func (*AggregateQuery) Project ¶
func (q *AggregateQuery) Project(projection bson.M) *AggregateQuery
Project adds a $project stage to the pipeline.
func (*AggregateQuery) Scan ¶
func (q *AggregateQuery) Scan(ctx context.Context, dest any) error
Scan executes the aggregation pipeline and decodes results into dest. dest should be a pointer to a slice.
func (*AggregateQuery) Skip ¶
func (q *AggregateQuery) Skip(n int64) *AggregateQuery
Skip adds a $skip stage to the pipeline.
func (*AggregateQuery) Sort ¶
func (q *AggregateQuery) Sort(sort bson.D) *AggregateQuery
Sort adds a $sort stage to the pipeline.
func (*AggregateQuery) Stage ¶
func (q *AggregateQuery) Stage(stage bson.M) *AggregateQuery
Stage adds a custom pipeline stage. Use this for stages not covered by the convenience methods (e.g., $addFields, $bucket, etc.).
func (*AggregateQuery) Unwind ¶
func (q *AggregateQuery) Unwind(path string) *AggregateQuery
Unwind adds a $unwind stage to the pipeline.
type CreateCollectionQuery ¶
type CreateCollectionQuery struct {
// contains filtered or unexported fields
}
CreateCollectionQuery builds and executes a MongoDB createCollection command with optional $jsonSchema validation derived from a Grove model.
func (*CreateCollectionQuery) AdditionalProperties ¶
func (q *CreateCollectionQuery) AdditionalProperties(allow bool) *CreateCollectionQuery
AdditionalProperties controls whether documents may contain fields not defined in the schema. Default is unset (MongoDB default: true).
func (*CreateCollectionQuery) BuildSchema ¶
func (q *CreateCollectionQuery) BuildSchema() (bson.M, error)
BuildSchema generates the $jsonSchema document without executing. Useful for inspecting or logging the generated schema.
func (*CreateCollectionQuery) Collection ¶
func (q *CreateCollectionQuery) Collection(name string) *CreateCollectionQuery
Collection overrides the collection name derived from the model.
func (*CreateCollectionQuery) Exec ¶
func (q *CreateCollectionQuery) Exec(ctx context.Context) error
Exec creates the collection with the generated $jsonSchema validator.
func (*CreateCollectionQuery) GetCollection ¶
func (q *CreateCollectionQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
func (*CreateCollectionQuery) IfNotExists ¶
func (q *CreateCollectionQuery) IfNotExists() *CreateCollectionQuery
IfNotExists makes the operation a no-op if the collection already exists.
func (*CreateCollectionQuery) ValidationAction ¶
func (q *CreateCollectionQuery) ValidationAction(action string) *CreateCollectionQuery
ValidationAction sets what happens when validation fails: "error" or "warn". Default is "error".
func (*CreateCollectionQuery) ValidationLevel ¶
func (q *CreateCollectionQuery) ValidationLevel(level string) *CreateCollectionQuery
ValidationLevel sets the validation level: "strict", "moderate", or "off". Default is "strict".
type DeleteQuery ¶
type DeleteQuery struct {
// contains filtered or unexported fields
}
DeleteQuery builds and executes MongoDB delete operations. Use MongoDB.NewDelete() to create one.
func (*DeleteQuery) Collection ¶
func (q *DeleteQuery) Collection(name string) *DeleteQuery
Collection overrides the collection name derived from the model.
func (*DeleteQuery) Exec ¶
func (q *DeleteQuery) Exec(ctx context.Context) (*mongoResult, error)
Exec executes the delete operation.
func (*DeleteQuery) Filter ¶
func (q *DeleteQuery) Filter(f bson.M) *DeleteQuery
Filter sets the query filter for matching documents to delete.
func (*DeleteQuery) GetCollection ¶
func (q *DeleteQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
func (*DeleteQuery) GetFilter ¶
func (q *DeleteQuery) GetFilter() bson.M
GetFilter returns the current filter. Useful for testing.
func (*DeleteQuery) IsMany ¶
func (q *DeleteQuery) IsMany() bool
IsMany returns whether the query targets multiple documents. Useful for testing.
func (*DeleteQuery) Many ¶
func (q *DeleteQuery) Many() *DeleteQuery
Many configures the query to delete all matching documents instead of just the first one.
type DropCollectionQuery ¶
type DropCollectionQuery struct {
// contains filtered or unexported fields
}
DropCollectionQuery drops a MongoDB collection.
func (*DropCollectionQuery) Collection ¶
func (q *DropCollectionQuery) Collection(name string) *DropCollectionQuery
Collection overrides the collection name derived from the model.
func (*DropCollectionQuery) Exec ¶
func (q *DropCollectionQuery) Exec(ctx context.Context) error
Exec drops the collection.
func (*DropCollectionQuery) GetCollection ¶
func (q *DropCollectionQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
type FindQuery ¶
type FindQuery struct {
// contains filtered or unexported fields
}
FindQuery builds and executes MongoDB find operations. Use MongoDB.NewFind() to create one.
func (*FindQuery) Collection ¶
Collection overrides the collection name derived from the model.
func (*FindQuery) Filter ¶
Filter sets the query filter. Multiple calls merge filters with $and semantics.
func (*FindQuery) GetCollection ¶
GetCollection returns the collection name. Useful for testing.
func (*FindQuery) GetProjection ¶
GetProjection returns the current projection document. Useful for testing.
func (*FindQuery) Scan ¶
Scan executes the find query and decodes results into the model. For slice pointers, it decodes all matching documents. For struct pointers, it decodes the first matching document.
type InsertQuery ¶
type InsertQuery struct {
// contains filtered or unexported fields
}
InsertQuery builds and executes MongoDB insert operations. Use MongoDB.NewInsert() to create one.
func (*InsertQuery) BuildDoc ¶
func (q *InsertQuery) BuildDoc() (bson.M, error)
buildDoc converts the model to a BSON document for insertion. Exported for testing purposes.
func (*InsertQuery) BuildDocs ¶
func (q *InsertQuery) BuildDocs() ([]bson.M, error)
buildDocs converts a slice model to BSON documents for insertion. Exported for testing purposes.
func (*InsertQuery) Collection ¶
func (q *InsertQuery) Collection(name string) *InsertQuery
Collection overrides the collection name derived from the model.
func (*InsertQuery) Exec ¶
func (q *InsertQuery) Exec(ctx context.Context) (*mongoResult, error)
Exec executes the insert operation. For single documents, uses InsertOne. For slices, uses InsertMany.
func (*InsertQuery) GetCollection ¶
func (q *InsertQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
MongoDB implements grove.GroveDriver for MongoDB using the official Go MongoDB driver v2. It also implements the grove adapter interfaces (txBeginner, queryBuilder) for integration with grove.DB.
func New ¶
func New() *MongoDB
New creates a new unconnected MongoDB driver. Call Open to establish a connection to the MongoDB server.
func Unwrap ¶
Unwrap extracts the underlying *MongoDB from a *grove.DB handle. This allows access to MongoDB-specific query builders and features.
mdb := mongodriver.Unwrap(db) // returns *mongodriver.MongoDB
mdb.NewFind(&users).Filter(bson.M{"role": "admin"}).Scan(ctx)
Panics if the driver is not a *MongoDB.
func (*MongoDB) Collection ¶
func (db *MongoDB) Collection(name string) *mongo.Collection
Collection returns a mongo.Collection handle for the named collection.
func (*MongoDB) DatabaseName ¶
DatabaseName returns the database name.
func (*MongoDB) GroveDelete ¶
GroveDelete is the adapter method for grove.DB.NewDelete().
func (*MongoDB) GroveInsert ¶
GroveInsert is the adapter method for grove.DB.NewInsert().
func (*MongoDB) GroveSelect ¶
GroveSelect is the adapter method for grove.DB.NewSelect().
func (*MongoDB) GroveTx ¶
GroveTx starts a MongoDB session-based transaction. This is the adapter method for grove.DB.BeginTx().
func (*MongoDB) GroveUpdate ¶
GroveUpdate is the adapter method for grove.DB.NewUpdate().
func (*MongoDB) NewAggregate ¶
func (db *MongoDB) NewAggregate(collection string) *AggregateQuery
NewAggregate creates a new aggregation pipeline query for the given collection.
func (*MongoDB) NewCreateCollection ¶
func (db *MongoDB) NewCreateCollection(model any) *CreateCollectionQuery
NewCreateCollection creates a CreateCollectionQuery for the given model.
mdb.NewCreateCollection((*User)(nil)).
ValidationLevel("strict").
ValidationAction("error").
AdditionalProperties(false).
IfNotExists().
Exec(ctx)
func (*MongoDB) NewDelete ¶
func (db *MongoDB) NewDelete(model any) *DeleteQuery
NewDelete creates a new DeleteQuery.
func (*MongoDB) NewDropCollection ¶
func (db *MongoDB) NewDropCollection(model any) *DropCollectionQuery
NewDropCollection creates a DropCollectionQuery for the given model.
mdb.NewDropCollection((*User)(nil)).Exec(ctx)
func (*MongoDB) NewFind ¶
NewFind creates a new FindQuery. model can be:
- *[]User (slice pointer for multi-row)
- *User (struct pointer for single row)
- (*User)(nil) (nil pointer for collection reference without binding)
func (*MongoDB) NewInsert ¶
func (db *MongoDB) NewInsert(model any) *InsertQuery
NewInsert creates a new InsertQuery. model can be a struct pointer or a pointer to a slice (for bulk insert).
func (*MongoDB) NewUpdate ¶
func (db *MongoDB) NewUpdate(model any) *UpdateQuery
NewUpdate creates a new UpdateQuery.
func (*MongoDB) Open ¶
Open connects to MongoDB using the given URI. The database name is extracted from the URI path. Use WithDatabase to override.
mdb := mongodriver.New() err := mdb.Open(ctx, "mongodb://localhost:27017/mydb")
type MongoOption ¶
type MongoOption func(*mongoOptions)
MongoOption configures the MongoDB driver during Open.
func WithConnectTimeout ¶
func WithConnectTimeout(d time.Duration) MongoOption
WithConnectTimeout overrides the default TCP connect timeout.
func WithDatabase ¶
func WithDatabase(name string) MongoOption
WithDatabase overrides the database name extracted from the connection URI. If not set, the database name from the URI is used.
func WithMaxConnIdleTime ¶
func WithMaxConnIdleTime(d time.Duration) MongoOption
WithMaxConnIdleTime sets how long an idle pooled connection lives.
func WithMaxConnecting ¶
func WithMaxConnecting(n uint64) MongoOption
WithMaxConnecting caps concurrent connection establishment.
func WithMaxPoolSize ¶
func WithMaxPoolSize(n uint64) MongoOption
WithMaxPoolSize caps the pooled connection count.
func WithMinPoolSize ¶
func WithMinPoolSize(n uint64) MongoOption
WithMinPoolSize keeps n connections warm in the pool. Use for polling workloads (e.g. dispatch dequeue loops) to avoid socket churn.
func WithPingRetries ¶
func WithPingRetries(n int) MongoOption
WithPingRetries sets the number of additional ping attempts after the first failure during Open. Use 0 to disable retries.
func WithPingRetryBackoff ¶
func WithPingRetryBackoff(d time.Duration) MongoOption
WithPingRetryBackoff sets the base backoff between ping attempts. The effective delay grows exponentially and is capped at 5s.
func WithPingTimeout ¶
func WithPingTimeout(d time.Duration) MongoOption
WithPingTimeout overrides the per-attempt ping timeout used during Open.
func WithServerSelectionTimeout ¶
func WithServerSelectionTimeout(d time.Duration) MongoOption
WithServerSelectionTimeout overrides the default server-selection timeout.
func WithSkipPing ¶
func WithSkipPing(skip bool) MongoOption
WithSkipPing disables the initial connectivity check during Open. Useful when the caller prefers to defer connectivity verification to Health().
func WithTimeout ¶
func WithTimeout(d time.Duration) MongoOption
WithTimeout sets the mongo v2 unified per-operation timeout. A zero value leaves the driver default in place.
type MongoTx ¶
type MongoTx struct {
// contains filtered or unexported fields
}
MongoTx wraps a MongoDB session with an active transaction. Query builder methods on MongoTx execute within the transaction's session context.
func (*MongoTx) NewDelete ¶
func (tx *MongoTx) NewDelete(model any) *DeleteQuery
NewDelete creates a DeleteQuery that executes within this transaction.
func (*MongoTx) NewInsert ¶
func (tx *MongoTx) NewInsert(model any) *InsertQuery
NewInsert creates an InsertQuery that executes within this transaction.
func (*MongoTx) NewUpdate ¶
func (tx *MongoTx) NewUpdate(model any) *UpdateQuery
NewUpdate creates an UpdateQuery that executes within this transaction.
type ObjectID ¶
ObjectID is the MongoDB 12-byte unique identifier.
var NilObjectID ObjectID
NilObjectID is the zero value for ObjectID.
func ObjectIDFromHex ¶
ObjectIDFromHex creates an ObjectID from a hex string.
type UpdateQuery ¶
type UpdateQuery struct {
// contains filtered or unexported fields
}
UpdateQuery builds and executes MongoDB update operations. Use MongoDB.NewUpdate() to create one.
func (*UpdateQuery) Collection ¶
func (q *UpdateQuery) Collection(name string) *UpdateQuery
Collection overrides the collection name derived from the model.
func (*UpdateQuery) Exec ¶
func (q *UpdateQuery) Exec(ctx context.Context) (*mongoResult, error)
Exec executes the update operation.
func (*UpdateQuery) Filter ¶
func (q *UpdateQuery) Filter(f bson.M) *UpdateQuery
Filter sets the query filter for matching documents to update.
func (*UpdateQuery) GetCollection ¶
func (q *UpdateQuery) GetCollection() string
GetCollection returns the collection name. Useful for testing.
func (*UpdateQuery) GetFilter ¶
func (q *UpdateQuery) GetFilter() bson.M
GetFilter returns the current filter. Useful for testing.
func (*UpdateQuery) GetUpdate ¶
func (q *UpdateQuery) GetUpdate() bson.M
GetUpdate returns the current update document. Useful for testing.
func (*UpdateQuery) IsMany ¶
func (q *UpdateQuery) IsMany() bool
IsMany returns whether the query targets multiple documents. Useful for testing.
func (*UpdateQuery) IsUpsert ¶
func (q *UpdateQuery) IsUpsert() bool
IsUpsert returns whether upsert is enabled. Useful for testing.
func (*UpdateQuery) Many ¶
func (q *UpdateQuery) Many() *UpdateQuery
Many configures the query to update all matching documents instead of just the first one.
func (*UpdateQuery) Set ¶
func (q *UpdateQuery) Set(field string, value any) *UpdateQuery
Set adds a field to the $set update operator.
func (*UpdateQuery) SetUpdate ¶
func (q *UpdateQuery) SetUpdate(update bson.M) *UpdateQuery
SetUpdate sets the entire update document (replaces any previous $set calls). Use this for complex update operations like $inc, $push, $unset, etc.
func (*UpdateQuery) Upsert ¶
func (q *UpdateQuery) Upsert() *UpdateQuery
Upsert enables upsert behavior: if no document matches the filter, a new document is inserted.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mongomigrate provides a MongoDB-specific migration executor for the Grove migration system.
|
Package mongomigrate provides a MongoDB-specific migration executor for the Grove migration system. |