import { ResolverOptions, InsertRow } from './interface'; import { ChunkFacade } from './chunk/chunk-facade'; declare type OnResolved = (chunk: ChunkFacade) => void; declare type OnResolvedAsync = (chunk: ChunkFacade) => Promise; /** * ChunkResolver is the central element of the application, * which implements all the logic of working with the caching process * and provides an API for interacting "outside" */ export declare class ChunkResolver { #private; /** * Create ChunkResolver instance * * @param {ResolverOptions} options */ constructor(options: ResolverOptions); /** * Pass your data in this method to store it * * It registers data in the system registry and saves it though the chosen data watcher * * @warning This method does not guarantee the validation of the transmitted data, * which may subsequently affect the outcome of inserting a chunk into the DBMS. * Be confident to validate it inself * * @param {Table} table table name * @param {InsertRow[]} rows list of rows * @returns */ cache(table: string, rows: InsertRow[]): Promise; /** * It registers a hadnler for resolved chunks * Pass @sync or @async callback and use it to save data to your DBMS */ onResolved(onResolved: OnResolved | OnResolvedAsync): void; } export {};