UNPKG

@nova-odm/expressions

Version:

Composable expression objects for Amazon DynamoDB

33 lines (32 loc) 1.33 kB
import { AttributeBearingExpression } from "./AttributeBearingExpression"; import { AttributePath } from "./AttributePath"; import { AttributeValue } from './AttributeValue'; import { ExpressionAttributes } from "./ExpressionAttributes"; import { FunctionExpression } from "./FunctionExpression"; import { MathematicalExpression } from "./MathematicalExpression"; /** * An object representing a DynamoDB update expression. */ export declare class UpdateExpression implements AttributeBearingExpression { readonly toAdd: Map<AttributePath, any>; readonly toDelete: Map<AttributePath, any>; readonly toRemove: Set<AttributePath>; readonly toSet: Map<AttributePath, any>; /** * Add a directive to the expression's `add` clause. */ add(path: AttributePath | string, value: any): void; /** * Add a directive to the expression's `delete` clause. */ delete(path: AttributePath | string, value: any): void; /** * Add a directive to the expression's `remove` clause. */ remove(path: AttributePath | string): void; /** * Add a directive to the expression's `set` clause. */ set(path: AttributePath | string, value: AttributeValue | FunctionExpression | MathematicalExpression | any): void; serialize(attributes: ExpressionAttributes): string; }