Click or drag to resize

UpdateBuilder Class

A builder for creating update modifiers.
Inheritance Hierarchy

Namespace:  MongoDB.Driver.Builders
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax
[SerializableAttribute]
public class UpdateBuilder : BuilderBase, 
	IMongoUpdate

The UpdateBuilder type exposes the following members.

Constructors
  NameDescription
Public methodUpdateBuilder
Initializes a new instance of the UpdateBuilder class.
Top
Methods
  NameDescription
Public methodAddToSet
Adds a value to a named array element if the value is not already in the array (see $addToSet).
Public methodAddToSetEach(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 methodAddToSetEach(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 methodAddToSetEach(String, IEnumerableBsonValue)
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 methodAddToSetEachWrappedT(String, IEnumerableT)
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 methodAddToSetEachWrappedT(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 methodAddToSetWrappedT
Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet).
Public methodBitwiseAnd(String, Int32)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodBitwiseAnd(String, Int64)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
Public methodBitwiseOr(String, Int32)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodBitwiseOr(String, Int64)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
Public methodBitwiseXor(String, Int32)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
Public methodBitwiseXor(String, Int64)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
Public methodCombine
Combines another UpdateBuilder into this one.
Public methodCurrentDate(String)
Sets the value of the named element to the current date (see $currentDate).
Public methodCurrentDate(String, UpdateCurrentDateType)
Sets the value of the named element to the current date (see $currentDate).
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInc(String, Double)
Increments the named element by a value (see $inc).
Public methodInc(String, Int32)
Increments the named element by a value (see $inc).
Public methodInc(String, Int64)
Increments the named element by a value (see $inc).
Public methodMax
Updates the named element if and only if the provided value is greater than its current value (see $max).
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMin
Updates the named element if and only if the provided value is less than its current value (see $max).
Public methodMul(String, Double)
Multiplies the named element by a value (see $mul).
Public methodMul(String, Int32)
Multiplies the named element by a value (see $mul).
Public methodMul(String, Int64)
Multiplies the named element by a value (see $mul).
Public methodPopFirst
Removes the first value from the named array element (see $pop).
Public methodPopLast
Removes the last value from the named array element (see $pop).
Public methodPull(String, BsonValue)
Removes all values from the named array element that are equal to some value (see $pull).
Public methodPull(String, IMongoQuery)
Removes all values from the named array element that match some query (see $pull).
Public methodPullAll(String, BsonArray)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodPullAll(String, BsonValue)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodPullAll(String, IEnumerableBsonValue)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
Public methodPullAllWrappedT(String, IEnumerableT)
Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll).
Public methodPullAllWrappedT(String, T)
Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll).
Public methodPullWrappedT
Removes all values from the named array element that are equal to some wrapped value (see $pull).
Public methodPush
Adds a value to the end of the named array element (see $push).
Public methodPushAll(String, BsonArray)
Adds a list of values to the end of the named array element (see $pushAll).
Public methodPushAll(String, BsonValue)
Adds a list of values to the end of the named array element (see $pushAll).
Public methodPushAll(String, IEnumerableBsonValue)
Adds a list of values to the end of the named array element (see $pushAll).
Public methodPushAllWrappedT(String, IEnumerableT)
Adds a list of wrapped values to the end of the named array element (see $pushAll).
Public methodPushAllWrappedT(String, T)
Adds a list of wrapped values to the end of the named array element (see $pushAll).
Public methodPushEach(String, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEach(String, BsonValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEach(String, IEnumerableBsonValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEach(String, PushEachOptions, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEach(String, PushEachOptions, BsonValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEach(String, PushEachOptions, IEnumerableBsonValue)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEachWrappedT(String, IEnumerableT)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEachWrappedT(String, T)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEachWrappedT(String, PushEachOptions, IEnumerableT)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushEachWrappedT(String, PushEachOptions, T)
Adds a list of values to the end of the named array element (see $push and $each).
Public methodPushWrappedT
Adds a wrapped value to the end of the named array element (see $push).
Public methodRename
Renames an element (see $rename).
Public methodSet
Sets the value of the named element to a new value (see $set).
Public methodSetOnInsert
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 methodSetWrappedT
Sets the value of the named element to a new wrapped value (see $set).
Public methodToBsonDocument
Returns the result of the builder as a BsonDocument.
(Overrides BuilderBaseToBsonDocument.)
Public methodToString
Returns a string representation of the settings.
(Inherited from BuilderBase.)
Public methodUnset
Removes the named element from the document (see $unset).
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also