UNPKG

arrow-store

Version:
37 lines (36 loc) 1.68 kB
import { DYNAMODB_ATTRIBUTE_TYPE } from "./mappers/schemaBuilders"; export declare type COMPARE_OPERATOR_TYPE = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEquals' | 'LessThan' | 'LessThanOrEquals'; export declare type FUNCTION_OPERATOR_TYPE = "Contains" | "BeginsWith" | "Exists" | "NotExists"; export declare type PRIMARY_ATTRIBUTE_TYPE = "Partition" | "Range"; export interface PrimaryAttributeValue extends AttributeDescriptor { getPrimaryKeyType(): PRIMARY_ATTRIBUTE_TYPE; getCompareOperator(): COMPARE_OPERATOR_TYPE | FUNCTION_OPERATOR_TYPE; } export declare type AttributeDescriptor = { getAttributeName(): string; getAttributeType(): DYNAMODB_ATTRIBUTE_TYPE; getAttributeValue(): string; }; export declare type PrimaryKeysMap = { partition: AttributeDescriptor; range: AttributeDescriptor; }; export declare type DynamoDBQueryResult<TRecord> = { lastKey: PrimaryKeysMap | null; records: ReadonlyArray<TRecord>; }; export declare type ArrowStoreRecordCtor<TRecord extends {}> = new (...args: any[]) => TRecord; export declare type ArrowStoreRecord = { getRecordId(): ArrowStoreRecordId; }; export declare type ArrowStoreTypeRecord<TRecordId extends ArrowStoreRecordId> = ArrowStoreRecord & {}; export declare type ArrowStoreRecordId = { getIndexName(): string | undefined; getRecordTypeId(): string; isConsistentRead(): boolean; getTableName(): string; getPrimaryKeys(): ReadonlyArray<PrimaryAttributeValue>; }; export declare type ArrowStoreTypeRecordId<TRecord extends {}> = ArrowStoreRecordId & { getCtor(): ArrowStoreRecordCtor<TRecord> | undefined; };