Interface SingleEntityOperations<TItem, TPKSource, TSKSource>

All the operations available when working with one entity at a time. This interface contains the "simple" versions of equivalent DynamoDB operations, but if you need more advanced behavior - e.g. for reading DynamoDB metadata - then use the versions on advancedOperations

interface SingleEntityOperations<TItem, TPKSource, TSKSource> {
    advancedOperations: SingleEntityAdvancedOperations<TItem, TPKSource, TSKSource>;
    delete<TKeySource>(keySource: TKeySource, options?: DeleteOptions): Promise<void>;
    getOrThrow<TKeySource>(keySource: TKeySource, options?: GetOptions): Promise<TItem>;
    getOrUndefined<TKeySource>(keySource: TKeySource, options?: GetOptions): Promise<undefined | TItem>;
    put(item: TItem, options?: PutOptions): Promise<TItem>;
    queryAllByPk(pkSource: TPKSource, options?: QueryAllOptions): Promise<TItem[]>;
    queryAllByPkAndSk(pkSource: TPKSource, queryRange: SkQueryRange, options?: QueryAllOptions): Promise<TItem[]>;
    queryAllWithGsiByPk<TGSIPKSource>(pkSource: TGSIPKSource, options?: GsiQueryAllOptions): Promise<TItem[]>;
    queryAllWithGsiByPkAndSk<TGSIPKSource>(pkSource: TGSIPKSource, queryRange: SkQueryRange, options?: GsiQueryAllOptions): Promise<TItem[]>;
    queryOnePageByPk(pkSource: TPKSource, options?: QueryOnePageOptions): Promise<OnePageResponse<TItem>>;
    queryOnePageByPkAndSk(pkSource: TPKSource, queryRange: SkQueryRange, options?: QueryOnePageOptions): Promise<OnePageResponse<TItem>>;
    queryOnePageWithGsiByPk<TGSIPKSource>(pkSource: TGSIPKSource, options?: GsiQueryOnePageOptions): Promise<OnePageResponse<TItem>>;
    queryOnePageWithGsiByPkAndSk<TGSIPKSource>(pkSource: TGSIPKSource, queryRange: SkQueryRange, options?: GsiQueryOnePageOptions): Promise<OnePageResponse<TItem>>;
    scanAll(options?: ScanAllOptions): Promise<TItem[]>;
    scanAllWithGsi(options?: WithGsiId): Promise<TItem[]>;
    scanOnePage(options?: ScanOnePageOptions): Promise<OnePageResponse<TItem>>;
    scanOnePageWithGsi(options?: GsiScanOnePageOptions): Promise<OnePageResponse<TItem>>;
    update<TKeySource>(keySource: TKeySource, options?: UpdateOptions): Promise<void>;
}

Type Parameters

Properties

Methods