Interface IMutateInBuilder<TDocument>
Exposes the creation of a set of mutation operations to be performed.
Inherited Members
Namespace: Couchbase.Core.IO.Operations.SubDocument
Assembly: Couchbase.NetClient.dll
Syntax
[Obsolete("This interface is not required and will be removed in a future release.")]
public interface IMutateInBuilder<TDocument> : ISubDocBuilder<TDocument>, ITypeSerializerProvider
Type Parameters
Name | Description |
---|---|
TDocument | The strong typed document (POCO) reflecting the structure of the paths. |
Properties
| Edit this page View SourceCas
A "check-and-set" value for ensuring that a document has not been modified by another thread.
Declaration
ulong Cas { get; }
Property Value
Type | Description |
---|---|
ulong |
Expiry
The "time-to-live" or "TTL" that specifies the document's lifetime.
Declaration
TimeSpan Expiry { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
PersistTo
A durability constraint ensuring that a document has been persisted to the n^th node.
Declaration
PersistTo PersistTo { get; }
Property Value
Type | Description |
---|---|
PersistTo |
ReplicateTo
A durability constraint for ensuring that the document has been replicated to the n^th node.
Declaration
ReplicateTo ReplicateTo { get; }
Property Value
Type | Description |
---|---|
ReplicateTo |
Methods
| Edit this page View SourceArrayAddUnique(object, bool)
Adds a value to an array if the value does not already exist in the array at the root of the JSON document.
Declaration
IMutateInBuilder<TDocument> ArrayAddUnique(object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
object | value | A unique value. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAddUnique(string, object, SubdocPathFlags, SubdocDocFlags)
Adds a value to an array if the value does not already exist in the array.
Declaration
IMutateInBuilder<TDocument> ArrayAddUnique(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | A unique value. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAddUnique(string, object, bool)
Adds a value to an array if the value does not already exist in the array.
Declaration
IMutateInBuilder<TDocument> ArrayAddUnique(string path, object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | A unique value. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(bool, params object[])
Inserts one or more values at the end of an array that is the root of a JSON document.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(bool createParents = false, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
bool | createParents | If |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(object, bool)
Inserts an array value at the end of an array that is the root of a JSON document.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
object | value | An array value. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(string, SubdocPathFlags, SubdocDocFlags, params object[])
Inserts one or more values to the end of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(string, bool, params object[])
Inserts one or more values to the end of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(string path, bool createParents = false, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
bool | createParents | If |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(string, object, SubdocPathFlags, SubdocDocFlags)
Inserts a value to the end of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An aray value. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayAppend(string, object, bool)
Inserts a value to the end of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayAppend(string path, object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An aray value. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayInsert(string, SubdocPathFlags, SubdocDocFlags, params object[])
Inserts one or more values at a given position within an array. The position is indicated as part of the path.
Declaration
IMutateInBuilder<TDocument> ArrayInsert(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayInsert(string, object)
Inserts a value at a given position within an array. The position is indicated as part of the path.
Declaration
IMutateInBuilder<TDocument> ArrayInsert(string path, object value)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | A value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayInsert(string, object, SubdocPathFlags, SubdocDocFlags)
Inserts a value at a given position within an array. The position is indicated as part of the path.
Declaration
IMutateInBuilder<TDocument> ArrayInsert(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | A value. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayInsert(string, params object[])
Inserts one or more values at a given position within an array. The position is indicated as part of the path.
Declaration
IMutateInBuilder<TDocument> ArrayInsert(string path, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(bool, params object[])
Inserts one or more values to the beginning of an array that is the root of a JSON document.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(bool createParents = false, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
bool | createParents | If |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(object, bool)
Inserts a value to the beginning of an array that is the root of a JSON document.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(string, SubdocPathFlags, SubdocDocFlags, params object[])
Inserts one or more values to the beginning of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(string, bool, params object[])
Inserts one or more values to the beginning of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(string path, bool createParents = false, params object[] values)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
bool | createParents | If |
object[] | values | One or more values. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(string, object, SubdocPathFlags, SubdocDocFlags)
Inserts a value to the beginning of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
ArrayPrepend(string, object, bool)
Inserts a value to the beginning of an array in a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> ArrayPrepend(string path, object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Counter(string, long, SubdocPathFlags, SubdocDocFlags)
Performs an arithmetic increment or decrement operation on a numeric value in a document.
Declaration
IMutateInBuilder<TDocument> Counter(string path, long delta, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
long | delta | The value to increment or decrement the original value by. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Counter(string, long, bool)
Performs an arithmetic increment or decrement operation on a numeric value in a document.
Declaration
IMutateInBuilder<TDocument> Counter(string path, long delta, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
long | delta | The value to increment or decrement the original value by. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Insert(string, object, SubdocPathFlags, SubdocDocFlags)
Inserts an element into a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Insert(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
SubdocPathFlags | pathFlags | The lookup flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Insert(string, object, bool)
Inserts an element into a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Insert(string path, object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Remove(string)
Removes an element or value from a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Remove(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Remove(string, SubdocPathFlags, SubdocDocFlags)
Removes an element or value from a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Remove(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Replace(string, object)
Replaces an element or value within a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Replace(string path, object value)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Replace(string, object, SubdocPathFlags, SubdocDocFlags)
Replaces an element or value within a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Replace(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Upsert(string, object, SubdocPathFlags, SubdocDocFlags)
Inserts or updates an element within or into a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Upsert(string path, object value, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
SubdocPathFlags | pathFlags | The path flags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
Upsert(string, object, bool)
Inserts or updates an element within or into a JSON document at a given path.
Declaration
IMutateInBuilder<TDocument> Upsert(string path, object value, bool createParents = true)
Parameters
Type | Name | Description |
---|---|---|
string | path | A string (N1QL syntax) used to specify a location within the document. |
object | value | An array value, dictionary entry, scalar or any other valid JSON item. |
bool | createParents | If |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithCas(long)
A "check-and-set" value for ensuring that a document has not been modified by another thread.
Declaration
IMutateInBuilder<TDocument> WithCas(long cas)
Parameters
Type | Name | Description |
---|---|---|
long | cas | The CAS value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithCas(ulong)
A "check-and-set" value for ensuring that a document has not been modified by another thread.
Declaration
IMutateInBuilder<TDocument> WithCas(ulong cas)
Parameters
Type | Name | Description |
---|---|---|
ulong | cas | The CAS value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithDurability(PersistTo)
A durability constraint ensuring that a document has been persisted to the n^th node.
Declaration
IMutateInBuilder<TDocument> WithDurability(PersistTo persistTo)
Parameters
Type | Name | Description |
---|---|---|
PersistTo | persistTo | The PersistTo value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> |
WithDurability(PersistTo, ReplicateTo)
Sets the ReplicateTo and PersistTo values for a document.
Declaration
IMutateInBuilder<TDocument> WithDurability(PersistTo persistTo, ReplicateTo replicateTo)
Parameters
Type | Name | Description |
---|---|---|
PersistTo | persistTo | The PersistTo value. |
ReplicateTo | replicateTo | The ReplicateTo value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithDurability(ReplicateTo)
A durability constraint ensuring that a document has been persisted to the n^th node.
Declaration
IMutateInBuilder<TDocument> WithDurability(ReplicateTo replicateTo)
Parameters
Type | Name | Description |
---|---|---|
ReplicateTo | replicateTo | The ReplicateTo value. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithExpiry(TimeSpan)
Applies an expiration to a document.
Declaration
IMutateInBuilder<TDocument> WithExpiry(TimeSpan expiry)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | The "time-to-live" or TTL of the document. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |
WithTimeout(TimeSpan)
The maximum time allowed for an operation to live before timing out.
Declaration
IMutateInBuilder<TDocument> WithTimeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | The timeout. |
Returns
Type | Description |
---|---|
IMutateInBuilder<TDocument> | An IMutateInBuilder<TDocument> reference for chaining operations. |