/** * CR-SQLite extension loading and information utilities. * * This module provides low-level utilities for loading the CR-SQLite extension * and retrieving information about it. It handles the dynamic import of the * native library, loads the extension into the SQLite connection, and provides * structured information about the loaded extension. * * The main operations include: * - Loading the CR-SQLite extension from the native library * - Querying extension information (SHA, site ID) * - Creating Effect services for dependency injection * * @since 0.1.0 */ import * as SqlClient from "@effect/sql/SqlClient"; import * as DateTime from "effect/DateTime"; import * as Effect from "effect/Effect"; import * as CrSqlErrors from "./CrSqlErrors.js"; /** * Configuration key for the CR-SQLite extension library path. * * This key is used to retrieve the filesystem path to the CR-SQLite * extension library from the configuration. It is expected that the * path points to a valid shared library file (e.g., `.so`, `.dylib`, `.dll`). * * @since 0.1.1 * @category Configuration */ export declare const LibCrSqlPathKey: "CRSQLITE_PATH"; /** * Query CR-SQLite extension information via SQL functions. * * Retrieves the extension's SHA and site ID by calling the built-in * CR-SQLite functions `crsql_sha()` and `crsql_site_id()`. This requires * the extension to already be loaded into the SQLite connection. * * @since 0.1.0 * @category Queries */ export declare const sqlExtInfo: Effect.Effect<{ readonly sha: string; readonly siteId: string; }, CrSqlErrors.CrSqliteExtensionMissing, SqlClient.SqlClient>; /** * Load the CR-SQLite extension and return complete information. * * This function performs the complete extension loading sequence: * 1. Dynamically imports the native library * 2. Gets the extension file path * 3. Loads the extension into the SQLite connection * 4. Queries the extension for SHA and site ID * 5. Returns complete information including loading metadata * * @since 0.1.0 * @category Operations */ export declare const loadLibCrSql: Effect.Effect<{ readonly sha: string; readonly siteId: string; readonly path: string | null; readonly loadedAt: DateTime.Utc; }, CrSqlErrors.CrSqliteExtensionMissing, SqlClient.SqlClient>; declare const ExtInfoLoaded_base: Effect.Service.Class; }>; /** * Effect service for accessing loaded CR-SQLite extension information. * * This service automatically loads the CR-SQLite extension and provides * access to the complete extension information including SHA, site ID, * filesystem path, and loading timestamp. * * @since 0.1.0 * @category Services */ export declare class ExtInfoLoaded extends ExtInfoLoaded_base { } export {}; //# sourceMappingURL=CrSqliteExtension.d.ts.map