Instance Methodmongokitten 7.9.5Meow
setField(at:to:)
MeowCollection+KeyPath.swift:278mutating func setField<R>(at keyPath: WritableKeyPath<M, QueryableField<R?>>, to newValue: R?) where R : Decodable, R : Encodable, R : RawRepresentable, R.RawValue : Primitive
Other members in extension
Instance members
var addToSet: [String : [any Primitive]]
var inc: Document
var set: Document
var unset: Document
func addToSet<Value>(at: WritableKeyPath<M, QueryableField<Set<Value>>>, value: Value
) Adds an atomic
$addToSet
to the update query that increments the numeric field corresponding tokeyPath
withnewValue
(or 1 by default)func addToSet<Value>(at: WritableKeyPath<M, QueryableField<Set<Value>>>, value: Value
) throws Adds an atomic
$addToSet
to the update query that increments the numeric field corresponding tokeyPath
withnewValue
(or 1 by default)func increment<I>(at: WritableKeyPath<M, QueryableField<I>>, by: I
) Adds an atomic
$unset
to the update query that increments the numeric field corresponding tokeyPath
withnewValue
(or 1 by default)func setField<P>(at: WritableKeyPath<M, QueryableField<P>>, to: P
) Adds an atomic
$set
to the update query that updates the field corresponding tokeyPath
to thenewValue
func setField<R>(at: WritableKeyPath<M, QueryableField<R>>, to: R
) Adds an atomic
$set
to the update query that updates the field corresponding tokeyPath
to thenewValue
func setField<P>(at: WritableKeyPath<M, QueryableField<P?>>, to: P?
) func unsetField<Value>(at: WritableKeyPath<M, QueryableField<Value?>>
) Adds an atomic
$unset
to the update query that updates the field corresponding tokeyPath
to be removed
Show obsolete interfaces (1)
Hide obsolete interfaces
func increment<I>(at: WritableKeyPath<M, QueryableField<I>>, to: I
) Adds an atomic
$unset
to the update query that increments the numeric field corresponding tokeyPath
withnewValue
(or 1 by default)