/** * The GraphAdapter URL-selected factory — the GraphDatabase sibling of Database. * * GraphDatabase.create picks an adapter by URL scheme and imports its driver * lazily (dynamic import): a missing driver raises an actionable install error, * never a bare module-not-found, and the graph CORE imports with no driver * present (the zero-dependency-core rule). The barrel deliberately does NOT * re-export any engine adapter, so importing @tina4/orm pulls in no graph driver. */ import { type GraphEngine } from "./graphUrl.js"; import type { GraphAdapter } from "./graphAdapter.js"; /** Credentials passed alongside the URL when it carries none. */ export interface GraphCredentials { username?: string; password?: string; } export interface AdapterRegistration { /** Dynamic import of the adapter module — the ONLY place a driver is pulled. */ load: () => Promise>; className: string; /** npm package that provides the engine driver. */ package: string; /** The command that installs it. */ installCommand: string; } /** * engine -> adapter registration. Selected lazily so importing this module pulls * in NO engine driver. bolt (Neo4j/Memgraph) and arango land later — declared so * the factory gives an actionable message rather than a bare KeyError. */ export declare const ENGINE_ADAPTERS: Partial>; export declare class GraphDatabase { /** * Parse the URL, pick the engine adapter, connect lazily. * * The engine driver is imported only here (first use of that engine); if it is * absent the error names the package and the install command. Async because the * driver import is dynamic — the connect itself still happens lazily on first * operation (mirroring the relational adapters). */ static create(url: string, credentials?: GraphCredentials): Promise; /** Build from TINA4_GRAPH_URL (+ TINA4_GRAPH_USERNAME/_PASSWORD). */ static fromEnv(envKey?: string): Promise; }