import type { JSONWithUndefined } from "type-party"; import type { CacheSpec } from "../types/00_CacheSpec.js"; import type { AnyValidators } from "../types/02_Validators.js"; import type { NormalizedParams } from "../types/06_Normalization.js"; import type { StoreGetManyResult } from "../types/06_Store.js"; import type { EntryForId, Logger, Store, StoreEntryInput, StoreGetManyRequest } from "../types/index.js"; export type SqliteStoreCompatibleSpec = CacheSpec; export type SqliteStoreSupportedParams = { [paramName: string]: string | number | boolean | undefined; }; /** * A {@link Store} backed by a single SQLite database file. * * SQLite runs in a dedicated worker thread via Node's built-in `node:sqlite` * module. Writes are serialized through one worker, while reads use a worker * pool. The persisted database file is intended to be portable as one cache * artifact once `close()` has resolved. */ export default class SqliteStore implements Store { #private; constructor(opts: { databasePath: string; fallbackDeleteAfter?: number; busyTimeoutMs?: number; readWorkerCount?: number; logger?: Logger; }); get(id: Id, params: Readonly>, options?: { signal?: AbortSignal; }): Promise[]>; getMany[]>(requests: Reqs, options?: { signal?: AbortSignal; }): Promise>; store(entries: readonly StoreEntryInput[]): Promise; delete(id: Spec["id"]): Promise; close(timeout?: number): Promise; [Symbol.asyncDispose](): Promise; } //# sourceMappingURL=SqliteStore.d.ts.map