ddb-table
Version:
Strongly typed library for querying and modeling DynamoDB documents.
18 lines (17 loc) • 897 B
TypeScript
import { DeleteCommandInput, GetCommandInput, Item, PutCommandInput, QueryCommandInput, ScanCommandInput, UpdateCommandInput } from '../DocumentClient';
import { ExpressionAttributeNames } from '../expressions';
export type QueryRequest<I, O> = (params: I) => Promise<O>;
type Inputs = PutCommandInput | GetCommandInput | ScanCommandInput | QueryCommandInput | UpdateCommandInput | DeleteCommandInput;
export default class Query<T extends Item, I extends Inputs, O> {
protected readonly input: I;
private readonly request;
protected names: ExpressionAttributeNames<T>;
protected constructor(request: QueryRequest<I, O>, params: I);
protected handleInputUpdated(): void;
protected syncInput(): void;
calcCapacity(mode: 'INDEXES' | 'TOTAL' | 'NONE'): this;
extend(input: Partial<I>): this;
serialize(): I;
exec(options?: Partial<I>): Promise<O>;
}
export {};