@@ -6,7 +6,7 @@ import { DynamoDbWrapper } from '../dynamo-db-wrapper'
66import { TransactOperation } from './transact-operation.type'
77
88/**
9- * Request class for the TransactWriteItems operation. Write up to 10 items to one or many tables in a transaction.
9+ * Request class for the TransactWriteItems operation. Write up to 25 items to one or many tables in a transaction.
1010 */
1111export class TransactWriteRequest {
1212 get dynamoDB ( ) : DynamoDB {
@@ -40,16 +40,16 @@ export class TransactWriteRequest {
4040 }
4141
4242 /**
43- * add up to 10 transaction operations
43+ * add up to 25 transaction operations
4444 * create the operations with:
4545 * {@link TransactConditionCheck}, {@link TransactDelete}, {@link TransactPut}, {@link TransactUpdate}
4646 */
4747 transact ( ...writeOperations : TransactOperation [ ] ) : this {
4848 if ( ! writeOperations || writeOperations . length === 0 ) {
4949 throw new Error ( 'at least one transaction operation must be added' )
5050 }
51- if ( this . params . TransactItems . length + writeOperations . length > 10 ) {
52- throw new Error ( `Each transaction can include up to 10 unique items, including conditions.\
51+ if ( this . params . TransactItems . length + writeOperations . length > 25 ) {
52+ throw new Error ( `Each transaction can include up to 25 unique items, including conditions.\
5353 Given operations count: ${ this . params . TransactItems . length + writeOperations . length } ` )
5454 }
5555 this . params . TransactItems . push ( ...writeOperations . map ( ( wo ) => wo . transactItem ) )
0 commit comments