@@ -6,7 +6,7 @@ import { DynamoDbWrapper } from '../dynamo-db-wrapper'
6
6
import { TransactOperation } from './transact-operation.type'
7
7
8
8
/**
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.
10
10
*/
11
11
export class TransactWriteRequest {
12
12
get dynamoDB ( ) : DynamoDB {
@@ -40,16 +40,16 @@ export class TransactWriteRequest {
40
40
}
41
41
42
42
/**
43
- * add up to 10 transaction operations
43
+ * add up to 25 transaction operations
44
44
* create the operations with:
45
45
* {@link TransactConditionCheck}, {@link TransactDelete}, {@link TransactPut}, {@link TransactUpdate}
46
46
*/
47
47
transact ( ...writeOperations : TransactOperation [ ] ) : this {
48
48
if ( ! writeOperations || writeOperations . length === 0 ) {
49
49
throw new Error ( 'at least one transaction operation must be added' )
50
50
}
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.\
53
53
Given operations count: ${ this . params . TransactItems . length + writeOperations . length } ` )
54
54
}
55
55
this . params . TransactItems . push ( ...writeOperations . map ( ( wo ) => wo . transactItem ) )
0 commit comments