UNPKG

dynamodb-toolbox

Version:

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

14 lines (13 loc) 430 B
import { $ADD } from '../../symbols/index.js'; import { pathTokens, refOrValueTokens } from './utils.js'; export const expressAddUpdate = (value, path, state) => { let addExpression = pathTokens(path, 'a', state); addExpression += ' '; addExpression += refOrValueTokens( /** * @debt type "Fix this cast" */ value[$ADD], 'a', state); state.addExpressions.push(addExpression); return state; };