object ReplaceOneModel
A model describing the replacement of at most one document that matches the query filter.
- Alphabetic
- By Inheritance
- ReplaceOneModel
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def apply[TResult](filter: Bson, replacement: TResult, replaceOptions: ReplaceOptions): ReplaceOneModel[TResult]
Construct a new instance.
Construct a new instance.
- TResult
the type of document to insert. This can be of any type for which a
Codec
is registered- filter
a document describing the query filter.
- replacement
the replacement document
- replaceOptions
the options to apply
- returns
the new ReplaceOneModel
- Since
2.3
- def apply[TResult](filter: Bson, replacement: TResult): ReplaceOneModel[TResult]
Construct a new instance.
Construct a new instance.
- TResult
the type of document to insert. This can be of any type for which a
Codec
is registered- filter
a document describing the query filter.
- replacement
the replacement document
- returns
the new ReplaceOneModel
Deprecated Value Members
- def apply[TResult](filter: Bson, replacement: TResult, updateOptions: UpdateOptions): ReplaceOneModel[TResult]
Construct a new instance.
Construct a new instance.
- TResult
the type of document to insert. This can be of any type for which a
Codec
is registered- filter
a document describing the query filter.
- replacement
the replacement document
- updateOptions
the options to apply
- returns
the new ReplaceOneModel
- Annotations
- @deprecated
- Deprecated
(Since version 2.3) Use
ReplaceOptions
instead ofUpdateOptions
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: