UNPKG

ddb-table

Version:

Strongly typed library for querying and modeling DynamoDB documents.

20 lines (19 loc) 742 B
import DynamoDBDocument, { Item, PutCommandInput, PutCommandOutput } from '../DocumentClient'; import Query from './Query'; import { ConditionGenerator } from '../expressions/ConditionExpression'; type QueryInput<T> = Omit<PutCommandInput, 'Item'> & { Item: T; }; type QueryOutput<T> = Omit<PutCommandOutput, 'Attributes'> & { Attributes?: T; }; export default class PutQuery<T extends Item> extends Query<T, QueryInput<T>, QueryOutput<T>> { private values; private conditions; constructor(client: DynamoDBDocument, params: QueryInput<T>); protected handleInputUpdated(): void; protected syncInput(): void; condition(fn: ConditionGenerator<T>): this; return(values: 'ALL_OLD' | 'NONE'): this; } export {};