Thanks to visit codestin.com
Credit goes to docs.couchbase.com

couchbase
    Preparing search index...

    Class TransactionAttemptContext

    Provides an interface to preform transactional operations in a transaction.

    Index

    Methods

    • 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.

      • Optionaloptions: TransactionInsertOptions

        Optional parameters for this operation.

      Returns Promise<TransactionGetResult>

    • Removes a document from a collection.

      Parameters

      Returns Promise<void>