Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CouchbaseList

CouchbaseList provides a simplified interface for storing lists within a Couchbase document.

see

Collection.list

Hierarchy

  • CouchbaseList

Index

Methods

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

    Returns AsyncIterator<any, any, undefined>

  • forEach(rowCallback: (value: any, index: number, array: CouchbaseList) => void, callback?: NodeCallback<void>): Promise<void>
  • Iterates each item in the list.

    Parameters

    • rowCallback: (value: any, index: number, array: CouchbaseList) => 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>

  • Returns the entire list of items in this list.

    Parameters

    • Optional callback: NodeCallback<any[]>

      A node-style callback to be invoked after execution.

    Returns Promise<any[]>

  • getAt(index: number, callback?: NodeCallback<any>): Promise<any>
  • Retrieves the item at a specific index in the list.

    Parameters

    • index: number

      The index to retrieve.

    • Optional callback: NodeCallback<any>

      A node-style callback to be invoked after execution.

    Returns Promise<any>

  • indexOf(value: any, callback?: NodeCallback<number>): Promise<number>
  • Returns the index of a specific value from the list.

    Parameters

    • value: any

      The value to search for.

    • Optional callback: NodeCallback<number>

      A node-style callback to be invoked after execution.

    Returns Promise<number>

  • push(value: any, callback?: NodeCallback<void>): Promise<void>
  • Adds a new item to the end of the list.

    Parameters

    • value: any

      The value to add.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • removeAt(index: number, callback?: NodeCallback<void>): Promise<void>
  • Removes an item at a specific index from the list.

    Parameters

    • index: number

      The index to remove.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • Returns the number of items in the list.

    Parameters

    • Optional callback: NodeCallback<number>

      A node-style callback to be invoked after execution.

    Returns Promise<number>

  • unshift(value: any, callback?: NodeCallback<void>): Promise<void>
  • Adds a new item to the beginning of the list.

    Parameters

    • value: any

      The value to add.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

Generated using TypeDoc