interface SqliteSchemaTemplateDatabase { query: (sql: string, ...values: unknown[]) => Promise; close?: () => Promise; } interface SqliteSchemaTemplateOptions { cacheKey: string; databaseOptions: Record & { url?: string; }; getDatabase: (options: Record & { url?: string; }) => Promise; prepare: (database: Database) => Promise; } /** Resolve a local SQLite URL to the file copied from a schema template. */ export declare function getLocalSqliteFilePath(options: { type?: string; url?: string; } | undefined): string | undefined; /** * Strip durability from local file-backed SQLite test databases. * * Test databases are created fresh per test and discarded afterwards, so * crash durability buys nothing — but SQLite's defaults (`synchronous=FULL`, * DELETE journal) cost 2-3 fsyncs per transaction. On runners with slow * fsync that dominates wall time: 9.5 ms/fsync measured on the metal CI * fleet turned the users package's catalog-seeding tests (~41k fsyncs) into * 200-400 s timeouts (#2221). `synchronous=OFF` removes fsync entirely, * `journal_mode=MEMORY` removes journal-file I/O (per-connection, safe for * the single-connection chains test databases use), and `temp_store=MEMORY` * keeps sort/temp b-trees off disk. * * Only file-backed local SQLite is touched: PostgreSQL and DuckDB reject * these pragmas, in-memory SQLite never fsyncs, and a thrown pragma must * never fail a test, so everything is guarded and best-effort. Applied by * the setup file's `getDatabase` mock and by the isolated test-db factories; * a test that needs real durability semantics must open its database with * `getDatabase` and `__smrtSkipVitestSchemaPreparation` directly. */ export declare function applySqliteSpeedPragmas(db: unknown, options: { type?: string; url?: string; } | undefined): Promise; /** * Open a fresh local SQLite database using an immutable schema-only template. * * The first caller prepares its own target database and snapshots it with * `VACUUM INTO`. Concurrent and later callers copy that snapshot before * opening their independent connection. Existing database files are never * replaced; they retain the normal additive schema-preparation path. */ export declare function getDatabaseFromSqliteSchemaTemplate({ cacheKey, databaseOptions, getDatabase, prepare, }: SqliteSchemaTemplateOptions): Promise; export {}; //# sourceMappingURL=sqlite-schema-template.d.ts.map