UNPKG

@nova-odm/expressions

Version:

Composable expression objects for Amazon DynamoDB

29 lines (28 loc) 1.08 kB
import { AttributePath } from "./AttributePath"; import { Marshaller } from "@nova-odm/auto-marshaller"; import { AttributeValue as AttributeValueModel } from '@aws-sdk/client-dynamodb'; /** * An object that manages expression attribute name and value substitution. */ export declare class ExpressionAttributes { readonly names: Record<string, string>; readonly values: Record<string, AttributeValueModel>; readonly marshaller: Marshaller; private readonly nameMap; private _ctr; /** * Add an attribute path to this substitution context. * * @returns The substitution value to use in the expression. The same * attribute name will always be converted to the same substitution value * when supplied to the same ExpressionAttributes object multiple times. */ addName(path: AttributePath | string): string; /** * Add an attribute value to this substitution context. * * @returns The substitution value to use in the expression. */ addValue(value: any): string; private addAttributeName; }