ddb-table
Version:
Strongly typed library for querying and modeling DynamoDB documents.
15 lines (14 loc) • 713 B
TypeScript
import DynamoDBDocument, { Item, ScanCommandInput, ScanCommandOutput } from '../DocumentClient';
import { ItemProjection, ProjectionFields } from '../expressions/ProjectionExpression';
import ItemsQuery from './ItemsQuery';
type QueryInput = ScanCommandInput;
type QueryOutput<T, K> = Omit<ScanCommandOutput, 'Items'> & {
Items?: T[];
LastEvaluatedKey?: K;
};
export default class ScanQuery<T extends K, K extends Item> extends ItemsQuery<T, K, QueryInput, QueryOutput<T, K>> {
constructor(client: DynamoDBDocument, params: QueryInput);
project<P extends ProjectionFields<T>>(fields: P): this & ScanQuery<K & ItemProjection<T, P>, K>;
segment(index: number, total: number): this;
}
export {};