dyno-table 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entity.cjs +106 -21
- package/dist/entity.cjs.map +1 -1
- package/dist/entity.d.cts +1 -1
- package/dist/entity.d.ts +1 -1
- package/dist/entity.js +106 -21
- package/dist/entity.js.map +1 -1
- package/dist/{table-BW3cmUqr.d.ts → table-B3fvMnkB.d.ts} +1 -1
- package/dist/{table-BEhBPy2G.d.cts → table-CM56NptV.d.cts} +1 -1
- package/dist/table.cjs +13 -16
- package/dist/table.cjs.map +1 -1
- package/dist/table.d.cts +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.js +13 -16
- package/dist/table.js.map +1 -1
- package/package.json +2 -2
package/dist/table.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import './builders/put-builder.cjs';
|
|
|
5
5
|
import './builders/delete-builder.cjs';
|
|
6
6
|
import './builders/update-builder.cjs';
|
|
7
7
|
import './builders/transaction-builder.cjs';
|
|
8
|
-
export { T as Table } from './table-
|
|
8
|
+
export { T as Table } from './table-CM56NptV.cjs';
|
|
9
9
|
import './builders/condition-check-builder.cjs';
|
|
10
10
|
import '@aws-sdk/lib-dynamodb';
|
|
11
11
|
import './builders/paginator.cjs';
|
package/dist/table.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import './builders/put-builder.js';
|
|
|
5
5
|
import './builders/delete-builder.js';
|
|
6
6
|
import './builders/update-builder.js';
|
|
7
7
|
import './builders/transaction-builder.js';
|
|
8
|
-
export { T as Table } from './table-
|
|
8
|
+
export { T as Table } from './table-B3fvMnkB.js';
|
|
9
9
|
import './builders/condition-check-builder.js';
|
|
10
10
|
import '@aws-sdk/lib-dynamodb';
|
|
11
11
|
import './builders/paginator.js';
|
package/dist/table.js
CHANGED
|
@@ -3123,23 +3123,20 @@ var Table = class {
|
|
|
3123
3123
|
* @param options Optional transaction options
|
|
3124
3124
|
* @returns A promise that resolves when the transaction is complete
|
|
3125
3125
|
*/
|
|
3126
|
-
transaction(callback, options) {
|
|
3127
|
-
const
|
|
3128
|
-
|
|
3129
|
-
await this.dynamoClient.transactWrite(params);
|
|
3130
|
-
};
|
|
3131
|
-
const transaction = new TransactionBuilder(transactionExecutor, {
|
|
3132
|
-
partitionKey: this.partitionKey,
|
|
3133
|
-
sortKey: this.sortKey
|
|
3134
|
-
});
|
|
3135
|
-
if (options) {
|
|
3136
|
-
transaction.withOptions(options);
|
|
3137
|
-
}
|
|
3138
|
-
const result = await callback(transaction);
|
|
3139
|
-
await transaction.execute();
|
|
3140
|
-
return result;
|
|
3126
|
+
async transaction(callback, options) {
|
|
3127
|
+
const transactionExecutor = async (params) => {
|
|
3128
|
+
await this.dynamoClient.transactWrite(params);
|
|
3141
3129
|
};
|
|
3142
|
-
|
|
3130
|
+
const transaction = new TransactionBuilder(transactionExecutor, {
|
|
3131
|
+
partitionKey: this.partitionKey,
|
|
3132
|
+
sortKey: this.sortKey
|
|
3133
|
+
});
|
|
3134
|
+
if (options) {
|
|
3135
|
+
transaction.withOptions(options);
|
|
3136
|
+
}
|
|
3137
|
+
const result = await callback(transaction);
|
|
3138
|
+
await transaction.execute();
|
|
3139
|
+
return result;
|
|
3143
3140
|
}
|
|
3144
3141
|
/**
|
|
3145
3142
|
* Creates a condition check operation for use in transactions
|