UNPKG

@nova-odm/expressions

Version:

Composable expression objects for Amazon DynamoDB

36 lines (35 loc) 1.12 kB
/** * The path to an attribute of a DynamoDB item or to a property * or member thereof. Supports map property access (`map.property`) * and list member access (`list[1]`). * * Control characters that are part of the property identifier may be * used when escaped with a backslash (`\`) character. */ export declare class AttributePath { readonly elements: Array<PathElement>; readonly [Symbol.toStringTag] = "AmazonDynamoDbAttributePath"; constructor(path: string | Iterable<PathElement>); /** * Determine if the provided value is an AttributePath object. * Compatible with AttributePath objects generated in other iframes * or Node VMs. */ static isAttributePath(arg: any): arg is AttributePath; } /** * A string identifying a top-level property of a DynamoDB item or * of a MapAttributeValue. */ export interface AttributeName { type: 'AttributeName'; name: string; } /** * The index of a particular member of a ListAttributeValue. */ export interface ListIndex { type: 'ListIndex'; index: number; } export type PathElement = AttributeName | ListIndex;