Couchbase .NET SDK | 3.4.4
Search Results for

    Show / Hide Table of Contents

    Class MutateInSpecBuilder

    A builder for generating an array of mutation Sub-Document operations.

    Inheritance
    Object
    MutateInSpecBuilder
    MutateInSpecBuilder<TDocument>
    Namespace: Couchbase.KeyValue
    Assembly: Couchbase.NetClient.dll
    Syntax
    public class MutateInSpecBuilder : object

    Methods

    | Improve this Doc View Source

    ArrayAddUnique<T>(String, T, Boolean, Boolean)

    Adds a value into an array element if the value does not already exist.

    Declaration
    public MutateInSpecBuilder ArrayAddUnique<T>(string path, T value, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value to insert.

    Boolean createPath

    True to create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayAppend<T>(String, T, Boolean, Boolean)

    Inserts an item to the end of an array element in a document.

    Declaration
    public MutateInSpecBuilder ArrayAppend<T>(string path, T value, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value to insert.

    Boolean createPath

    True to create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayAppend<T>(String, T[], Boolean, Boolean)

    Inserts multiple values to the end of an array element in a document.

    Declaration
    public MutateInSpecBuilder ArrayAppend<T>(string path, T[] values, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T[] values

    The values to insert.

    Boolean createPath

    True to create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayInsert<T>(String, T, Boolean, Boolean)

    Inserts an item to an array element in a document given an index

    Declaration
    public MutateInSpecBuilder ArrayInsert<T>(string path, T value, bool createParents = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value to insert.

    Boolean createParents

    Maps to 0x01 if true, otherwise omitted - create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayInsert<T>(String, T[], Boolean, Boolean)

    Inserts multiple values to an array element in a document given an index

    Declaration
    public MutateInSpecBuilder ArrayInsert<T>(string path, T[] values, bool createParents = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T[] values

    The values to insert.

    Boolean createParents

    Maps to 0x01 if true, otherwise omitted - create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayPrepend<T>(String, T, Boolean, Boolean)

    Inserts an item to the beginning of an array element in a document.

    Declaration
    public MutateInSpecBuilder ArrayPrepend<T>(string path, T value, bool createParents = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value to insert.

    Boolean createParents

    Maps to 0x01 if true, otherwise omitted - create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    ArrayPrepend<T>(String, T[], Boolean, Boolean)

    Inserts multiple values to the beginning of an array element in a document.

    Declaration
    public MutateInSpecBuilder ArrayPrepend<T>(string path, T[] values, bool createParents = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T[] values

    The values to insert.

    Boolean createParents

    Maps to 0x01 if true, otherwise omitted - create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    Decrement(String, Int64, Boolean, Boolean)

    Performs an arithmetic increment or decrement on a numeric element within a document.

    Declaration
    public MutateInSpecBuilder Decrement(string path, long delta, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the element.

    Int64 delta

    the amount to decrease the value by

    Boolean createPath
    Boolean isXattr
    Returns
    Type Description
    MutateInSpecBuilder
    | Improve this Doc View Source

    Decrement(String, UInt64, Boolean, Boolean)

    Performs an arithmetic increment or decrement on a numeric element within a document.

    Declaration
    public MutateInSpecBuilder Decrement(string path, ulong delta, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the element.

    UInt64 delta

    the amount to decrease the value by

    Boolean createPath
    Boolean isXattr
    Returns
    Type Description
    MutateInSpecBuilder
    | Improve this Doc View Source

    Increment(String, Int64, Boolean, Boolean)

    Performs an arithmetic increment or decrement on a numeric element within a document.

    Declaration
    public MutateInSpecBuilder Increment(string path, long delta, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the element.

    Int64 delta

    the amount to increase the value by

    Boolean createPath
    Boolean isXattr
    Returns
    Type Description
    MutateInSpecBuilder
    | Improve this Doc View Source

    Increment(String, UInt64, Boolean, Boolean)

    Performs an arithmetic increment or decrement on a numeric element within a document.

    Declaration
    public MutateInSpecBuilder Increment(string path, ulong delta, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the element.

    UInt64 delta

    the amount to increase the value by

    Boolean createPath
    Boolean isXattr
    Returns
    Type Description
    MutateInSpecBuilder
    | Improve this Doc View Source

    Insert<T>(String, T, Boolean, Boolean)

    Inserts an element into a document, failing if it exists.

    Declaration
    public MutateInSpecBuilder Insert<T>(string path, T value, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value of type "T".

    Boolean createPath

    True to create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    Remove(String, Boolean)

    Removes an element in a document.

    Declaration
    public MutateInSpecBuilder Remove(string path, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    | Improve this Doc View Source

    Replace<T>(String, T, Boolean)

    Replaces an element in a document, failing if it does not exist.

    Declaration
    public MutateInSpecBuilder Replace<T>(string path, T value, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value of type "T".

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    | Improve this Doc View Source

    SetDoc<T>(T)

    Declaration
    public MutateInSpecBuilder SetDoc<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    MutateInSpecBuilder
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Upsert<T>(String, T, Boolean, Boolean)

    Inserts an element into a document, overriding the value if it exists

    Declaration
    public MutateInSpecBuilder Upsert<T>(string path, T value, bool createPath = null, bool isXattr = null)
    Parameters
    Type Name Description
    String path

    The path to the JSON attribute.

    T value

    The value of type "T".

    Boolean createPath

    True to create the path if it doesn't exist.

    Boolean isXattr

    true if the path is an xAttr; otherwise false.

    Returns
    Type Description
    MutateInSpecBuilder

    A MutateInSpecBuilder for chaining.

    Type Parameters
    Name Description
    T

    The type of the value being inserted.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 Couchbase, Inc.