Class BinaryCollection

Exposes a number of binary-level operations against a collection. These operations do not adhere to the standard JSON-centric behaviour of the SDK.

Methods

  • Appends the specified value to the end of the specified key.

    Parameters

    • key: string

      The key to append to.

    • value: string | Buffer

      The value to adjoin to the end of the document.

    • Optional options: AppendOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<MutationResult>

      A node-style callback to be invoked after execution.

    Returns Promise<MutationResult>

  • Decrements the ASCII value of the specified key by the amount indicated in the delta parameter.

    Parameters

    • key: string

      The key to increment.

    • delta: number

      The amount to increment the key.

    • Optional options: DecrementOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<CounterResult>

      A node-style callback to be invoked after execution.

    Returns Promise<CounterResult>

  • Increments the ASCII value of the specified key by the amount indicated in the delta parameter.

    Parameters

    • key: string

      The key to increment.

    • delta: number

      The amount to increment the key.

    • Optional options: IncrementOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<CounterResult>

      A node-style callback to be invoked after execution.

    Returns Promise<CounterResult>

  • Prepends the specified value to the beginning of the specified key.

    Parameters

    • key: string

      The key to prepend to.

    • value: string | Buffer

      The value to adjoin to the beginning of the document.

    • Optional options: PrependOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<MutationResult>

      A node-style callback to be invoked after execution.

    Returns Promise<MutationResult>