Click or drag to resize

UpdateTDocument Class

A builder for creating update modifiers.
Inheritance Hierarchy
SystemObject
  MongoDB.Driver.BuildersUpdateTDocument

Namespace:  MongoDB.Driver.Builders
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax
public static class Update<TDocument>

Type Parameters

TDocument
The document type.

The UpdateTDocument type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddToSetTValue
Adds a value to a named array element if the value is not already in the array (see $addToSet).
Public methodStatic memberAddToSetEachTValue
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 memberBitwiseAnd(ExpressionFuncTDocument, Int32, Int32)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodStatic memberBitwiseAnd(ExpressionFuncTDocument, Int64, Int64)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodStatic memberBitwiseOr(ExpressionFuncTDocument, Int32, Int32)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodStatic memberBitwiseOr(ExpressionFuncTDocument, Int64, Int64)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodStatic memberBitwiseXor(ExpressionFuncTDocument, Int32, Int32)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
Public methodStatic memberBitwiseXor(ExpressionFuncTDocument, Int64, 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(IEnumerableIMongoUpdate)
Combines several UpdateBuilders into a single UpdateBuilder.
Public methodStatic memberCurrentDate(ExpressionFuncTDocument, DateTime)
Sets the value of the named element to the current date (see $currentDate).
Public methodStatic memberCurrentDate(ExpressionFuncTDocument, BsonDateTime)
Sets the value of the named element to the current date (see $currentDate).
Public methodStatic memberCurrentDate(ExpressionFuncTDocument, BsonTimestamp)
Sets the value of the named element to the current date (see $currentDate).
Public methodStatic memberInc(ExpressionFuncTDocument, Double, Double)
Increments the named element by a value (see $inc).
Public methodStatic memberInc(ExpressionFuncTDocument, Int32, Int32)
Increments the named element by a value (see $inc).
Public methodStatic memberInc(ExpressionFuncTDocument, Int64, Int64)
Increments the named element by a value (see $inc).
Public methodStatic memberMaxTMember
Updates the named element if and only if the provided value is greater than its current value (see $max).
Public methodStatic memberMinTMember
Updates the named element if and only if the provided value is less than its current value (see $max).
Public methodStatic memberMul(ExpressionFuncTDocument, Double, Double)
Multiplies the named element by a value (see $mul).
Public methodStatic memberMul(ExpressionFuncTDocument, Int32, Int32)
Multiplies the named element by a value (see $mul).
Public methodStatic memberMul(ExpressionFuncTDocument, Int64, Int64)
Multiplies the named element by a value (see $mul).
Public methodStatic memberPopFirstTValue
Removes the first value from the named array element (see $pop).
Public methodStatic memberPopLastTValue
Removes the last value from the named array element (see $pop).
Public methodStatic memberPullTValue(ExpressionFuncTDocument, IEnumerableTValue, FuncQueryBuilderTValue, IMongoQuery)
Removes all values from the named array element that match some query (see $pull).
Public methodStatic memberPullTValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Removes all values from the named array element that are equal to some value (see $pull).
Public methodStatic memberPullAllTValue
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodStatic memberPushTValue
Adds a value to the end of the named array element (see $push).
Public methodStatic memberPushAllTValue
Adds a list of values to the end of the named array element (see $pushAll).
Public methodStatic memberPushEachTValue(ExpressionFuncTDocument, IEnumerableTValue, IEnumerableTValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachTValue(ExpressionFuncTDocument, IEnumerableTValue, PushEachOptions, IEnumerableTValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberPushEachTValue(ExpressionFuncTDocument, IEnumerableTValue, ActionPushEachOptionsBuilderTValue, IEnumerableTValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodStatic memberReplace
Replaces the entire document with a new document (the _id must remain the same).
Public methodStatic memberSetTMember
Sets the value of the named element to a new value (see $set).
Public methodStatic memberSetOnInsertTMember
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 memberUnsetTMember
Removes the named element from the document (see $unset).
Top
See Also