Class TransactionAttemptContext

Provides an interface to preform transactional operations in a transaction.

Hierarchy

  • TransactionAttemptContext

Methods

  • Retrieves the value of a document from the collection.

    Parameters

    • collection: Collection

      The collection the document lives in.

    • key: string

      The document key to retrieve.

    Returns Promise<TransactionGetResult>

  • Inserts a new document to the collection, failing if the document already exists.

    Parameters

    • collection: Collection

      The collection the document lives in.

    • key: string

      The document key to insert.

    • content: any

      The document content to insert.

    Returns Promise<TransactionGetResult>

  • Removes a document from a collection.

    Parameters

    Returns Promise<void>

Generated using TypeDoc