{"version":3,"sources":["../src/backend/sqlite/local-options.ts"],"names":[],"mappings":";;;AA8BO,IAAM,4BAAA,GACX;AAAA,EACE,WAAA,EAAa,KAAA;AAAA,EACb,WAAA,EAAa,QAAA;AAAA,EACb,aAAA,EAAe,GAAA;AAAA,EACf,YAAA,EAAc,MAAA;AAAA,EACd,aAAA,EAAe,MAAA;AAAA,EACf,sBAAA,EAAwB;AAC1B","file":"chunk-QCD5JKU4.cjs","sourcesContent":["/** Journal modes accepted by local SQLite connections. */\nexport type LocalSqliteJournalMode =\n  \"wal\" | \"delete\" | \"truncate\" | \"persist\" | \"memory\" | \"off\";\n\n/** Synchronous levels accepted by local SQLite connections. */\nexport type LocalSqliteSynchronousMode = \"off\" | \"normal\" | \"full\" | \"extra\";\n\n/** Connection pragmas applied when TypeGraph opens a local SQLite database. */\nexport type LocalSqlitePragmaOptions = Readonly<{\n  /** `PRAGMA journal_mode`. Default: `\"wal\"` (no-op on `\":memory:\"`). */\n  journalMode?: LocalSqliteJournalMode;\n  /** `PRAGMA synchronous`. Default: `\"normal\"`. */\n  synchronous?: LocalSqliteSynchronousMode;\n  /** `PRAGMA busy_timeout`, in milliseconds. Default: `5000`. */\n  busyTimeoutMs?: number;\n  /**\n   * `PRAGMA cache_size`, expressed as a negative KiB value. Positive values\n   * mean pages in SQLite and are rejected to prevent accidental oversizing.\n   */\n  cacheSizeKib?: number | undefined;\n  /** `PRAGMA mmap_size`, in non-negative bytes. */\n  mmapSizeBytes?: number | undefined;\n  /**\n   * `PRAGMA wal_autocheckpoint`, in WAL pages. Use `0` to disable automatic\n   * checkpoints and run them explicitly after controlled bulk loads.\n   */\n  walAutocheckpointPages?: number | undefined;\n}>;\n\n/** Defaults for TypeGraph-owned local SQLite connections. */\nexport const DEFAULT_LOCAL_SQLITE_PRAGMAS: Required<LocalSqlitePragmaOptions> =\n  {\n    journalMode: \"wal\",\n    synchronous: \"normal\",\n    busyTimeoutMs: 5000,\n    cacheSizeKib: undefined,\n    mmapSizeBytes: undefined,\n    walAutocheckpointPages: undefined,\n  };\n"]}