UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

18 lines (17 loc) 613 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expressAddUpdate = void 0; const index_js_1 = require("../../symbols/index.js"); const utils_js_1 = require("./utils.js"); const expressAddUpdate = (value, path, state) => { let addExpression = (0, utils_js_1.pathTokens)(path, 'a', state); addExpression += ' '; addExpression += (0, utils_js_1.refOrValueTokens)( /** * @debt type "Fix this cast" */ value[index_js_1.$ADD], 'a', state); state.addExpressions.push(addExpression); return state; }; exports.expressAddUpdate = expressAddUpdate;