Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CouchbaseMap

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

see

Collection.map

Hierarchy

  • CouchbaseMap

Index

Methods

  • [asyncIterator](): AsyncIterator<[any, string], any, undefined>
  • Provides the ability to async-for loop this object.

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

  • exists(item: string, callback?: NodeCallback<boolean>): Promise<boolean>
  • 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>

  • forEach(rowCallback: ((value: any, key: string, map: CouchbaseMap) => void), callback?: NodeCallback<void>): Promise<void>
  • Iterates through every item in the map.

    Parameters

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

      A callback invoked for each item in the list.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • get(item: string, callback?: NodeCallback<any>): Promise<any>
  • 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<{}>

      A node-style callback to be invoked after execution.

    Returns Promise<{}>

  • 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[]>

  • remove(item: string, callback?: NodeCallback<void>): Promise<void>
  • 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>

  • set(item: string, value: any, callback?: NodeCallback<void>): 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[]>

Generated using TypeDoc