Click or drag to resize

Update Class

A builder for creating update modifiers.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.Builders.Update

Namespace:  MongoDB.Driver.Builders
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public static class Update

The Update type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddToSet
Adds a value to a named array element if the value is not already in the array (see $addToSet).
Public methodStatic memberAddToSetEach(String, BsonArray)
Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each).
Public methodStatic memberAddToSetEach(String,BsonValue[])
Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each).
Public methodStatic memberAddToSetEach(String, IEnumerable<BsonValue>)
Adds a list of values to a named array element adding each value only if it not already in the array (see $addToSet and $each).
Public methodStatic memberAddToSetEachWrapped<T>(String, IEnumerable<T>)
Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each).
Public methodStatic memberAddToSetEachWrapped<T>(String,T[])
Adds a list of wrapped values to a named array element adding each value only if it not already in the array (see $addToSet and $each).
Public methodStatic memberAddToSetWrapped<T>
Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet).
Public methodStatic memberBitwiseAnd(String, Int32)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodStatic memberBitwiseAnd(String, Int64)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodStatic memberBitwiseOr(String, Int32)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodStatic memberBitwiseOr(String, Int64)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodStatic memberBitwiseXor(String, Int32)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
Public methodStatic memberBitwiseXor(String, Int64)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
Public methodStatic memberCombine(IMongoUpdate[])
Combines several UpdateBuilders into a single UpdateBuilder.
Public methodStatic memberCombine(IEnumerable<IMongoUpdate>)
Combines several UpdateBuilders into a single UpdateBuilder.
Public methodStatic memberCurrentDate(String)
Sets the value of the named element to the current date (see $currentDate).
Public methodStatic memberCurrentDate(String, UpdateCurrentDateType)
Sets the value of the named element to the current date (see $currentDate).
Public methodStatic memberInc(String, Double)
Increments the named element by a value (see $inc).
Public methodStatic memberInc(String, Int32)
Increments the named element by a value (see $inc).
Public methodStatic memberInc(String, Int64)
Increments the named element by a value (see $inc).
Public methodStatic memberMax
Updates the named element if and only if the provided value is greater than its current value (see $max).
Public methodStatic memberMin
Updates the named element if and only if the provided value is less than its current value (see $max).
Public methodStatic memberMul(String, Double)
Multiplies the named element by a value (see $mul).
Public methodStatic memberMul(String, Int32)
Multiplies the named element by a value (see $mul).
Public methodStatic memberMul(String, Int64)
Multiplies the named element by a value (see $mul).
Public methodStatic memberPopFirst
Removes the first value from the named array element (see $pop).
Public methodStatic memberPopLast
Removes the last value from the named array element (see $pop).
Public methodStatic memberPull(String, BsonValue)
Removes all values from the named array element that are equal to some value (see $pull).
Public methodStatic memberPull(String, IMongoQuery)
Removes all values from the named array element that match some query (see $pull).
Public methodStatic memberPullAll(String, BsonArray)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodStatic memberPullAll(String,BsonValue[])
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodStatic memberPullAll(String, IEnumerable<BsonValue>)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodStatic memberPullAllWrapped<T>(String, IEnumerable<T>)
Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll).
Public methodStatic memberPullAllWrapped<T>(String,T[])
Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll).
Public methodStatic memberPullWrapped<T>
Removes all values from the named array element that are equal to some wrapped value (see $pull).
Public methodStatic memberPush
Adds a value to the end of the named array element (see $push).
Public methodStatic memberPushAll(String, BsonArray)
Adds a list of values to the end of the named array element (see $pushAll).
Public methodStatic memberPushAll(String,BsonValue[])
Adds a list of values to the end of the named array element (see $pushAll).
Public methodStatic memberPushAll(String, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $pushAll).
Public methodStatic memberPushAllWrapped<T>(String, IEnumerable<T>)
Adds a list of wrapped values to the end of the named array element (see $pushAll).
Public methodStatic memberPushAllWrapped<T>(String,T[])
Adds a list of wrapped values to the end of the named array element (see $pushAll).
Public methodStatic memberPushEach(String, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEach(String,BsonValue[])
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEach(String, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEach(String, PushEachOptions, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEach(String, PushEachOptions,BsonValue[])
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEach(String, PushEachOptions, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachWrapped<T>(String, IEnumerable<T>)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachWrapped<T>(String,T[])
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachWrapped<T>(String, PushEachOptions, IEnumerable<T>)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachWrapped<T>(String, PushEachOptions,T[])
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushWrapped<T>
Adds a wrapped value to the end of the named array element (see $push).
Public methodStatic memberRename
Renames an element (see $rename).
Public methodStatic memberReplace(Type, Object)
Replaces the entire document with a new document (the _id must remain the same).
Public methodStatic memberReplace<TNominalType>(TNominalType)
Replaces the entire document with a new document (the _id must remain the same).
Public methodStatic memberSet
Sets the value of the named element to a new value (see $set).
Public methodStatic memberSetOnInsert
Sets the value of the named element to the specified value only when an insert occurs as part of an upsert operation (see $setOnInsert).
Public methodStatic memberSetWrapped<T>
Sets the value of the named element to a new wrapped value (see $set).
Public methodStatic memberUnset
Removes the named element from the document (see $unset).
Top
See Also