Class CouchbaseMap

CouchbaseMap provides a simplified interface for storing a map within a Couchbase document.

Methods

  • Provides the ability to async-for loop this object.

    Returns AsyncIterator<[any, string], any, undefined>

  • Checks whether a specific key exists in the map.

    Parameters

    • item: string

      The key in the map to search for.

    • Optional callback: NodeCallback<boolean>

      A node-style callback to be invoked after execution.

    Returns Promise<boolean>

  • Iterates through every item in the map.

    Parameters

    • rowCallback: ((value, key, map) => void)

      A callback invoked for each item in the list.

        • (value, key, map): void
        • Parameters

          Returns void

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • Fetches a specific key from the map.

    Parameters

    • item: string

      The key in the map to retrieve.

    • Optional callback: NodeCallback<any>

      A node-style callback to be invoked after execution.

    Returns Promise<any>

  • Returns an object representing all items in the map.

    Parameters

    • Optional callback: NodeCallback<{
          [key: string]: any;
      }>

      A node-style callback to be invoked after execution.

    Returns Promise<{
        [key: string]: any;
    }>

  • Returns a list of all the keys which exist in the map.

    Parameters

    • Optional callback: NodeCallback<string[]>

      A node-style callback to be invoked after execution.

    Returns Promise<string[]>

  • Removes a specific key from the map.

    Parameters

    • item: string

      The key in the map to remove.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • Sets a specific to the specified value in the map.

    Parameters

    • item: string

      The key in the map to set.

    • value: any

      The new value to set.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • Returns the number of items that exist in the map.

    Parameters

    • Optional callback: NodeCallback<number>

      A node-style callback to be invoked after execution.

    Returns Promise<number>

  • Returns a list of all the values which exist in the map.

    Parameters

    • Optional callback: NodeCallback<any[]>

      A node-style callback to be invoked after execution.

    Returns Promise<any[]>