import { a as Storage, d as StorageStartOptions, T as Trace, S as Selector, e as CreateResourceOptions, I as InstanceFor, M as MetadataFor, f as DatabaseMetadata, N as NamespaceMetadata } from '../shared/hive.DlaRxYsk.js'; import { RowObject, RowValues, Transaction, TransactionResult } from '../sdk/transaction.js'; import { ByteStream } from '../streams/index.js'; import '../sdk/logger.js'; import 'zod'; //#region src/index.d.ts type DiskStorageConfig = { /** * Path to the directory in which to persist state. * * Either an absolute path or a path relative to the current * working directory. */ dir: string; }; declare class DiskStorage extends Storage { static readonly name = "disk-storage"; /** * Absolute path to the directory in which to persist state. */ readonly dir: string; /** * Runtime-specific implementation of SQLite. */ private driver; /** * EventEmitter instance to use for emitting events. */ private events; /** * Logger instance to use for logging. */ private logger; /** * Map containing all pending operations per Resource. */ private readonly pending; /** * Map keeping references to open Resources, their `Connection` (or `null` for * Namespaces) and their Metadata. */ private readonly cache; constructor(config: DiskStorageConfig); start(opts: Omit & { logger?: StorageStartOptions['logger'] | null | undefined; onError?: StorageStartOptions['onError'] | null | undefined; trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; stop(opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; create(selector: S, opts?: CreateResourceOptions): Promise<{ resource: InstanceFor; metadata: MetadataFor; }>; list(opts?: { parent?: Selector<'namespace'> | Selector<'database'> | null | undefined; trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise>; has(selector: Selector, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; get(selector: S, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise<{ resource: InstanceFor; metadata: MetadataFor; }>; getMetadata(selector: S, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise>; getContents(selector: Selector<'database' | 'snapshot' | 'branch'>, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise<{ contents: ByteStream; metadata: DatabaseMetadata; }>; setContents(selector: Selector<'database' | 'snapshot' | 'branch'>, contents: ByteStream | Uint8Array | Selector<'database' | 'snapshot' | 'branch'>, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; query = ReadonlyArray>(selector: Selector<'database' | 'snapshot' | 'branch'>, transaction: Transaction, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise>; free(selector: Selector, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; delete(selector: Selector, opts?: { trace?: Trace | null | undefined; emit?: boolean | null | undefined; }): Promise; } export { DiskStorage }; export type { DiskStorageConfig };