import { Knex } from 'knex'; import { StorageReader, StorageReaderOptions } from '../StorageReader'; import { TableSettings } from '../schema/tables/TableSettings'; import { TableUser } from '../schema/tables/TableUser'; import { TableSyncState } from '../schema/tables/TableSyncState'; import { TableCertificateX } from '../schema/tables/TableCertificate'; import { TableOutputBasket } from '../schema/tables/TableOutputBasket'; import { TableOutput } from '../schema/tables/TableOutput'; import { TableProvenTxReq } from '../schema/tables/TableProvenTxReq'; import { Chain, EntityTimeStamp } from '../../sdk/types'; import { FindCertificateFieldsArgs, FindCommissionsArgs, FindForUserSincePagedArgs, FindMonitorEventsArgs, FindOutputTagsArgs, FindPartialSincePagedArgs, FindSyncStatesArgs, FindTransactionsArgs, FindTxLabelsArgs, FindUsersArgs, TrxToken, WalletStorageSyncReader, FindCertificatesArgs, FindOutputBasketsArgs, FindOutputsArgs } from '../../sdk/WalletStorage.interfaces'; import { TableTxLabel } from '../schema/tables/TableTxLabel'; import { TableOutputTag } from '../schema/tables/TableOutputTag'; import { TableTransaction } from '../schema/tables/TableTransaction'; import { TableCommission } from '../schema/tables/TableCommission'; import { TableCertificateField } from '../schema/tables/TableCertificateField'; import { TableProvenTx } from '../schema/tables/TableProvenTx'; import { TableTxLabelMap } from '../schema/tables/TableTxLabelMap'; import { TableOutputTagMap } from '../schema/tables/TableOutputTagMap'; import { TableMonitorEvent } from '../schema/tables/TableMonitorEvent'; export interface StorageMySQLDojoReaderOptions extends StorageReaderOptions { chain: Chain; /** * Knex database interface initialized with valid connection configuration. */ knex: Knex; } export declare class StorageMySQLDojoReader extends StorageReader implements WalletStorageSyncReader { knex: Knex; constructor(options: StorageMySQLDojoReaderOptions); destroy(): Promise; transaction(scope: (trx: TrxToken) => Promise, trx?: TrxToken): Promise; toDb(trx?: TrxToken): Knex; readSettings(trx?: TrxToken): Promise; setupQuery(table: string, args: FindPartialSincePagedArgs): Knex.QueryBuilder; findOutputBasketsQuery(args: FindOutputBasketsArgs): Knex.QueryBuilder; findOutputBaskets(args: FindOutputBasketsArgs): Promise; findTxLabelsQuery(args: FindTxLabelsArgs): Knex.QueryBuilder; findTxLabels(args: FindTxLabelsArgs): Promise; findOutputTagsQuery(args: FindOutputTagsArgs): Knex.QueryBuilder; findOutputTags(args: FindOutputTagsArgs): Promise; findTransactionsQuery(args: FindTransactionsArgs, count?: boolean): Knex.QueryBuilder; findTransactions(args: FindTransactionsArgs): Promise; findCommissionsQuery(args: FindCommissionsArgs): Knex.QueryBuilder; findCommissions(args: FindCommissionsArgs): Promise; limitString(s: string, maxLen: number): string; findOutputsQuery(args: FindOutputsArgs, count?: boolean): Knex.QueryBuilder; findOutputs(args: FindOutputsArgs): Promise; findCertificatesQuery(args: FindCertificatesArgs): Knex.QueryBuilder; findCertificates(args: FindCertificatesArgs): Promise; findCertificateFieldsQuery(args: FindCertificateFieldsArgs): Knex.QueryBuilder; findCertificateFields(args: FindCertificateFieldsArgs): Promise; findSyncStates(args: FindSyncStatesArgs): Promise; findUsers(args: FindUsersArgs): Promise; getProvenTxsForUserQuery(args: FindForUserSincePagedArgs): Knex.QueryBuilder; getProvenTxsForUser(args: FindForUserSincePagedArgs): Promise; getProvenTxReqsForUserQuery(args: FindForUserSincePagedArgs): Knex.QueryBuilder; getProvenTxReqsForUser(args: FindForUserSincePagedArgs): Promise; getTxLabelMapsForUserQuery(args: FindForUserSincePagedArgs): Knex.QueryBuilder; getTxLabelMapsForUser(args: FindForUserSincePagedArgs): Promise; getOutputTagMapsForUserQuery(args: FindForUserSincePagedArgs): Knex.QueryBuilder; getOutputTagMapsForUser(args: FindForUserSincePagedArgs): Promise; countCertificateFields(args: FindCertificateFieldsArgs): Promise; countCertificates(args: FindCertificatesArgs): Promise; countCommissions(args: FindCommissionsArgs): Promise; countOutputBaskets(args: FindOutputBasketsArgs): Promise; countOutputs(args: FindOutputsArgs): Promise; countOutputTags(args: FindOutputTagsArgs): Promise; countSyncStates(args: FindSyncStatesArgs): Promise; countTransactions(args: FindTransactionsArgs): Promise; countTxLabels(args: FindTxLabelsArgs): Promise; countUsers(args: FindUsersArgs): Promise; findMonitorEvents(args: FindMonitorEventsArgs): Promise; countMonitorEvents(args: FindMonitorEventsArgs): Promise; /** * Helper to force uniform behavior across database engines. * Use to process all individual records with time stamps retreived from database. */ validateEntity(entity: T, dateFields?: string[], booleanFields?: string[]): T; /** * Helper to force uniform behavior across database engines. * Use to process all arrays of records with time stamps retreived from database. * @returns input `entities` array with contained values validated. */ validateEntities(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]; } //# sourceMappingURL=StorageMySQLDojoReader.d.ts.map