@squiz/db-lib 1.70.0 → 1.71.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/CHANGELOG.md +6 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
- package/src/dynamodb/AbstractDynamoDbRepository.spec.ts +0 -1
- package/src/dynamodb/AbstractDynamoDbRepository.ts +2 -0
- package/src/dynamodb/DynamoDbManager.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
@@ -57765,6 +57765,9 @@ var DynamoDbManager = class {
|
|
57765
57765
|
if (this.transactionItems[transactionId] === void 0) {
|
57766
57766
|
throw new TransactionError(`No items in transaction '${transactionId}' to execute`);
|
57767
57767
|
}
|
57768
|
+
if (!this.transactionItems[transactionId].length) {
|
57769
|
+
return;
|
57770
|
+
}
|
57768
57771
|
return tracer.startActiveSpan(
|
57769
57772
|
"executeTransaction",
|
57770
57773
|
{
|
@@ -58018,6 +58021,7 @@ var AbstractDynamoDbRepository = class {
|
|
58018
58021
|
ConditionExpression: `attribute_exists(${this.keys.pk.attributeName})`
|
58019
58022
|
};
|
58020
58023
|
if ((_a = transaction.id) == null ? void 0 : _a.length) {
|
58024
|
+
delete deleteCommandInput.ConditionExpression;
|
58021
58025
|
this.dbManager.addWriteTransactionItem(transaction.id, {
|
58022
58026
|
Delete: deleteCommandInput
|
58023
58027
|
});
|