@aereal/cdk-dynamodb-expression
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

CI NPM version

cdk-dynamodb-expression

DynamoDB expression builder for AWS CDK.

Synopsis

import { dynamoAttrName, ExpressionBuilder } from "@aereal/cdk-dynamodb-expression";
import { DynamoAttributeValue } from "@aws-cdk/aws-stepfunctions-tasks";

const builder = new ExpressionBuilder();
const {
  expression,
  expressionAttributeNames,
  expressionAttributeValues,
} = builder.expr`SET ${dynamoAttrName(
  "Executing"
)} = ${DynamoAttributeValue.fromBoolean(true)}`;
expect(expression).toBe("SET #0 = :v0");
expect(expressionAttributeValues).toStrictEqual({
  ":v0": DynamoAttributeValue.fromBoolean(true),
});
expect(expressionAttributeNames).toStrictEqual({ "#0": "Executing" });

Installation

yarn add @aereal/cdk-dynamodb-expression
npm i -S @aereal/cdk-dynamodb-expression

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @aereal/cdk-dynamodb-expression

Weekly Downloads

1

Version

2.2.0

License

MIT

Unpacked Size

26.1 kB

Total Files

21

Last publish

Collaborators

  • aereal