UNPKG

dynamodb-toolbox

Version:

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

10 lines (9 loc) 377 B
import { $SET } from '../../symbols/index.js'; import { pathTokens, refOrValueTokens } from './utils.js'; export const expressSetUpdate = (value, path, state) => { let setExpression = pathTokens(path, 's', state); setExpression += ' = '; setExpression += refOrValueTokens(value[$SET], 's', state); state.setExpressions.push(setExpression); return state; };