UNPKG

@nova-odm/expressions

Version:

Composable expression objects for Amazon DynamoDB

21 lines (20 loc) 1.04 kB
import { AttributeBearingExpression } from "./AttributeBearingExpression"; import { AttributePath } from "./AttributePath"; import { ExpressionAttributes } from "./ExpressionAttributes"; import { FunctionExpression } from "./FunctionExpression"; export type MathematicalExpressionOperand = AttributePath | FunctionExpression | string | number; /** * An object representing a DynamoDB function expression. */ export declare class MathematicalExpression implements AttributeBearingExpression { readonly lhs: MathematicalExpressionOperand; readonly operator: '+' | '-'; readonly rhs: MathematicalExpressionOperand; readonly [Symbol.toStringTag] = "AmazonDynamoDbMathematicalExpression"; constructor(lhs: MathematicalExpressionOperand, operator: '+' | '-', rhs: MathematicalExpressionOperand); serialize(attributes: ExpressionAttributes): string; /** * Evaluate whether the provided value is a MathematicalExpression object. */ static isMathematicalExpression(arg: any): arg is MathematicalExpression; }