UNPKG

@env0/dynamo-easy

Version:

DynamoDB client for NodeJS and browser with a fluent api to build requests. We take care of the type mapping between JS and DynamoDB, customizable trough typescript decorators.

18 lines 550 B
/** * @module expression */ import { hasSortKey } from '../../decorator/metadata/metadata'; import { attribute } from './logical-operator/public.api'; /** * @hidden */ export function createIfNotExistsCondition(metadata) { var conditionDefFns = [ attribute(metadata.getPartitionKey()).attributeNotExists(), ]; if (hasSortKey(metadata)) { conditionDefFns.push(attribute(metadata.getSortKey()).attributeNotExists()); } return conditionDefFns; } //# sourceMappingURL=create-if-not-exists-condition.function.js.map