@commodo/fields-storage-dynamodb
Version:
We're working hard to get all the docs in order. New articles will be added daily.
35 lines (32 loc) • 685 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const validTypes = ["string", "boolean", "number"];
const eq = {
canProcess: ({
key,
value
}) => {
if (key && key.charAt(0) === "$") {
return false;
}
if (value && typeof value["$eq"] !== "undefined") {
return true;
}
return validTypes.includes(typeof value);
},
process: ({
key,
value,
args
}) => {
args.expression += `#${key} = :${key}`;
args.attributeNames[`#${key}`] = key;
args.attributeValues[`:${key}`] = value;
}
};
var _default = eq;
exports.default = _default;
//# sourceMappingURL=eq.js.map