Class UpdateBuilder
A builder for creating update modifiers.
[Serializable]
[BsonSerializer(typeof(UpdateBuilder.Serializer))]
public class UpdateBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoUpdate
- Inheritance
-
UpdateBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
- UpdateBuilder()
Initializes a new instance of the UpdateBuilder class.
Methods
- AddToSet(string, BsonValue)
Adds a value to a named array element if the value is not already in the array (see $addToSet).
- AddToSetEach(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).
- AddToSetEach(string, params 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).
- AddToSetEach(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).
- AddToSetEachWrapped<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).
- AddToSetEachWrapped<T>(string, params 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).
- AddToSetWrapped<T>(string, T)
Adds a wrapped value to a named array element if the value is not already in the array (see $addToSet).
- BitwiseAnd(string, int)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
- BitwiseAnd(string, long)
Sets the named element to the bitwise and of its value with another value (see $bit with "and").
- BitwiseOr(string, int)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
- BitwiseOr(string, long)
Sets the named element to the bitwise or of its value with another value (see $bit with "or").
- BitwiseXor(string, int)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
- BitwiseXor(string, long)
Sets the named element to the bitwise xor of its value with another value (see $bit with "xor").
- Combine(IMongoUpdate)
Combines another UpdateBuilder into this one.
- CurrentDate(string)
Sets the value of the named element to the current date (see $currentDate).
- CurrentDate(string, UpdateCurrentDateType)
Sets the value of the named element to the current date (see $currentDate).
- Inc(string, double)
Increments the named element by a value (see $inc).
- Inc(string, int)
Increments the named element by a value (see $inc).
- Inc(string, long)
Increments the named element by a value (see $inc).
- Max(string, BsonValue)
Updates the named element if and only if the provided value is greater than its current value (see $max).
- Min(string, BsonValue)
Updates the named element if and only if the provided value is less than its current value (see $max).
- Mul(string, double)
Multiplies the named element by a value (see $mul).
- Mul(string, int)
Multiplies the named element by a value (see $mul).
- Mul(string, long)
Multiplies the named element by a value (see $mul).
- PopFirst(string)
Removes the first value from the named array element (see $pop).
- PopLast(string)
Removes the last value from the named array element (see $pop).
- Pull(string, BsonValue)
Removes all values from the named array element that are equal to some value (see $pull).
- Pull(string, IMongoQuery)
Removes all values from the named array element that match some query (see $pull).
- PullAll(string, BsonArray)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
- PullAll(string, params BsonValue[])
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
- PullAll(string, IEnumerable<BsonValue>)
Removes all values from the named array element that are equal to any of a list of values (see $pullAll).
- PullAllWrapped<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).
- PullAllWrapped<T>(string, params T[])
Removes all values from the named array element that are equal to any of a list of wrapped values (see $pullAll).
- PullWrapped<T>(string, T)
Removes all values from the named array element that are equal to some wrapped value (see $pull).
- Push(string, BsonValue)
Adds a value to the end of the named array element (see $push).
- PushAll(string, BsonArray)
Adds a list of values to the end of the named array element (see $pushAll).
- PushAll(string, params BsonValue[])
Adds a list of values to the end of the named array element (see $pushAll).
- PushAll(string, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $pushAll).
- PushAllWrapped<T>(string, IEnumerable<T>)
Adds a list of wrapped values to the end of the named array element (see $pushAll).
- PushAllWrapped<T>(string, params T[])
Adds a list of wrapped values to the end of the named array element (see $pushAll).
- PushEach(string, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEach(string, params BsonValue[])
Adds a list of values to the end of the named array element (see $push and $each).
- PushEach(string, PushEachOptions, BsonArray)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEach(string, PushEachOptions, params BsonValue[])
Adds a list of values to the end of the named array element (see $push and $each).
- PushEach(string, PushEachOptions, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEach(string, IEnumerable<BsonValue>)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEachWrapped<T>(string, PushEachOptions, IEnumerable<T>)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEachWrapped<T>(string, PushEachOptions, params T[])
Adds a list of values to the end of the named array element (see $push and $each).
- PushEachWrapped<T>(string, IEnumerable<T>)
Adds a list of values to the end of the named array element (see $push and $each).
- PushEachWrapped<T>(string, params T[])
Adds a list of values to the end of the named array element (see $push and $each).
- PushWrapped<T>(string, T)
Adds a wrapped value to the end of the named array element (see $push).
- Rename(string, string)
Renames an element (see $rename).
- Set(string, BsonValue)
Sets the value of the named element to a new value (see $set).
- SetOnInsert(string, BsonValue)
Sets the value of the named element to the specified value only when an insert occurs as part of an upsert operation (see $setOnInsert).
- SetWrapped<T>(string, T)
Sets the value of the named element to a new wrapped value (see $set).
- ToBsonDocument()
Returns the result of the builder as a BsonDocument.
- Unset(string)
Removes the named element from the document (see $unset).