dyna-record
    Preparing search index...

    Class TransactionBuilder

    Build and executes a TransactWriteItems request

    Write-condition guards and library pins are merged onto the item already queued on their row (TransactionBuilder.addGuard, TransactionBuilder.addPin), after every library item is queued. A transaction with neither sends exactly the items queued.

    Index

    Constructors

    Methods

    • Add a conditional check to the transaction

      Parameters

      • item: Omit<ConditionCheck, "Key" | "ExpressionAttributeValues"> & {}
      • conditionFailedMsg: string

      Returns void

    • Add a delete operation to the transaction

      Parameters

      • item: Omit<Delete, "Key" | "ExpressionAttributeValues"> & {}
      • OptionalconditionFailedMsg: string

      Returns void

    • Merges a consumer's write-condition guard onto its row.

      The guard's condition is parenthesized and ANDed onto the item queued on the row, or onto a new ConditionCheck requiring the row's existence when nothing is queued there. The item returns the row it failed on, so a cancellation can be attributed.

      Call only in an operation that carries a condition, after every library item is queued: an item queued later onto a guard-only row throws.

      Parameters

      Returns void

      When the guard's pin row holds no queued item, or a placeholder would be rebound

    • Add a put operation to the transaction

      Parameters

      • item: Omit<Put, "ExpressionAttributeValues" | "Item"> & {}
      • OptionalconditionFailedMsg: string

      Returns void

    • Add an update operation to the transaction

      Parameters

      • item: Omit<Update, "Key" | "ExpressionAttributeValues"> & {}
      • OptionalconditionFailedMsg: string

      Returns void

    • Returns a value placeholder prefix no other fragment or pin of this transaction uses (EX: wc1_), for compiling one condition fragment. A filter builder numbers placeholders from zero per instance, so two fragments compiled separately would otherwise bind the same placeholder

      Returns string

    • Replaces the tracked condition-failure message for an already-queued update item, for conditions appended to the item after it was queued

      Parameters

      • item: Omit<Update, "Key" | "ExpressionAttributeValues"> & {}

        The queued update item, matched by reference

      • errMsg: string

        The replacement error message

      Returns void