ag-common 0.0.588 → 0.0.590
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.
|
@@ -315,15 +315,17 @@ exports.wipeTable = wipeTable;
|
|
|
315
315
|
const getDynamoUpdates = (item, opt) => {
|
|
316
316
|
var _a;
|
|
317
317
|
let ek = (_a = opt === null || opt === void 0 ? void 0 : opt.excludeKeys) !== null && _a !== void 0 ? _a : ['PK'];
|
|
318
|
-
|
|
318
|
+
ek = ek.map((r) => r.toLowerCase());
|
|
319
|
+
let UpdateExpression = `SET
|
|
320
|
+
`;
|
|
319
321
|
const ExpressionAttributeNames = {};
|
|
320
322
|
const ExpressionAttributeValues = {};
|
|
321
323
|
//
|
|
322
|
-
const cleanedKeys = Object.entries(item).filter(([k]) => !ek.includes(k));
|
|
324
|
+
const cleanedKeys = Object.entries(item).filter(([k]) => !ek.includes(k.toLowerCase()));
|
|
323
325
|
cleanedKeys
|
|
324
326
|
.filter(([_k, v]) => v !== null && v !== undefined)
|
|
325
327
|
.forEach(([k, v]) => {
|
|
326
|
-
UpdateExpression +=
|
|
328
|
+
UpdateExpression += `#${k} = :${k}, `;
|
|
327
329
|
ExpressionAttributeNames[`#${k}`] = k;
|
|
328
330
|
ExpressionAttributeValues[`:${k}`] = v.toString();
|
|
329
331
|
});
|
package/package.json
CHANGED