dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
14 lines (13 loc) • 560 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.expressSetUpdate = void 0;
const index_js_1 = require("../../symbols/index.js");
const utils_js_1 = require("./utils.js");
const expressSetUpdate = (value, path, state) => {
let setExpression = (0, utils_js_1.pathTokens)(path, 's', state);
setExpression += ' = ';
setExpression += (0, utils_js_1.refOrValueTokens)(value[index_js_1.$SET], 's', state);
state.setExpressions.push(setExpression);
return state;
};
exports.expressSetUpdate = expressSetUpdate;