Files
bun-mariadb/dist/functions/init.d.ts
T

22 lines
632 B
TypeScript

import { type BunMariaDBConfig, type BUN_MARIADB_DatabaseSchemaType } from "../types";
/**
* # Declare Global Variables
*/
declare global {
var CONFIG: BunMariaDBConfig;
var DB_SCHEMA: BUN_MARIADB_DatabaseSchemaType;
/** Unset after the client is closed */
var MARIADB_CLIENT: Bun.SQL | undefined;
var CONFIG_FILE_PATH: string;
var SCHEMA_FILE_PATH: string;
}
/**
* Load config + schema and set up the shared MariaDB client.
* Throws on any problem (never exits the process).
*/
export default function init(): void;
/**
* Initialize once, on first use.
*/
export declare function ensureInit(): void;