TableTransactWrite
Table-level command to perform an atomic write transaction across multiple entity types.
Unlike TransactWrite which operates on a single entity type, this command accepts
operations from multiple entities via entity.prepare([...]) and executes them as
a single all-or-nothing DynamoDB transaction.
Example
Section titled “Example”await table.send(new TableTransactWrite({ transactions: [ userEntity.prepare([ new Put({ item: { userId: 'u1', name: 'Alice' } }), new Delete({ key: { userId: 'u2', name: 'Bob' } }), ]), orderEntity.prepare([ new Update({ key: { orderId: 'o1' }, update: { status: 'shipped' } }), ]), ],}))Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TableTransactWrite(config): TableTransactWrite;Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”TableTransactWrite
Methods
Section titled “Methods”execute()
Section titled “execute()”execute(table): Promise<TableTransactWriteResult>;Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<TableTransactWriteResult>