Comparing version 1.5.1 to 1.5.2
@@ -106,6 +106,6 @@ import AWS = require('aws-sdk'); | ||
* Execute a series of max 10 write operations in a single transaction. | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} operations the ops to execute in the transaction | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} ops the operations to execute in the transaction | ||
* @return {Promise<any>} | ||
*/ | ||
transactWrites(operations: Array<AWS.DynamoDB.TransactWriteItem>): Promise<any>; | ||
transactWrites(ops: Array<AWS.DynamoDB.DocumentClient.TransactWriteItem>): Promise<any>; | ||
} |
@@ -285,8 +285,8 @@ "use strict"; | ||
* Execute a series of max 10 write operations in a single transaction. | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} operations the ops to execute in the transaction | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} ops the operations to execute in the transaction | ||
* @return {Promise<any>} | ||
*/ | ||
transactWrites(operations) { | ||
transactWrites(ops) { | ||
return new Promise((resolve, reject) => { | ||
if (operations.length == 0) { | ||
if (ops.length == 0) { | ||
IdeaX.logger(`TRANSACTION WRITES`, null, `No elements to write`); | ||
@@ -296,3 +296,3 @@ resolve(); | ||
else | ||
this.dynamo.transactWrite({ TransactItems: operations.slice(0, 10) }, (err) => { | ||
this.dynamo.transactWrite({ TransactItems: ops.slice(0, 10) }, (err) => { | ||
IdeaX.logger(`TRANSACTION WRITES`, err, null); | ||
@@ -299,0 +299,0 @@ if (err) |
{ | ||
"name": "idea-aws", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "AWS wrappers to use in IDEA's back-ends", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -284,11 +284,11 @@ import AWS = require('aws-sdk'); | ||
* Execute a series of max 10 write operations in a single transaction. | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} operations the ops to execute in the transaction | ||
* @param {Array<AWS.DynamoDB.TransactWriteItem>} ops the operations to execute in the transaction | ||
* @return {Promise<any>} | ||
*/ | ||
public transactWrites(operations: Array<AWS.DynamoDB.TransactWriteItem>): Promise<any> { | ||
public transactWrites(ops: Array<AWS.DynamoDB.DocumentClient.TransactWriteItem>): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
if(operations.length == 0) { | ||
if(ops.length == 0) { | ||
IdeaX.logger(`TRANSACTION WRITES`, null, `No elements to write`); | ||
resolve(); | ||
} else this.dynamo.transactWrite({ TransactItems: operations.slice(0, 10) }, (err: Error) => { | ||
} else this.dynamo.transactWrite({ TransactItems: ops.slice(0, 10) }, (err: Error) => { | ||
IdeaX.logger(`TRANSACTION WRITES`, err, null); | ||
@@ -295,0 +295,0 @@ if(err) reject(err); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3593081