Imported from json-choi/dopedb (
src-tauri/src/driver/AGENTS.md). Install upstream withnpx skills add json-choi/dopedb --skill driver. Copyright stays with the author.
src-tauri/src/driver
Purpose
Driver registry and runtime dispatch. Decides which protocol driver is
compatible with and preferred for a given connection target; concrete
adapters (in ../connection, ../mongo, ../bigquery) own the actual
connection mechanics. Downloadable driver packs share the same metadata
contract as bundled drivers — this module does not pretend Rust crates can be
hot-loaded the way JDBC jars can.
Key Files
| File | Description |
|---|---|
mod.rs |
The driver registry: metadata contract for bundled and downloadable drivers, and compatibility/preference resolution. |
For AI Agents
Working In This Directory
- A new engine or driver pack must fit the existing metadata contract here
rather than inventing a parallel registration path; the frontend's driver
list (
list_drivers/install_driverin../features/connections) reads through this registry.
Testing Requirements
- Covered indirectly by
pnpm test:rust(cargo test --package dopedb --lib); no dedicated#[cfg(test)]block here today.
Dependencies
Internal
- Consumed by
../features/connections(driver listing/installation) and by../connectionwhen resolving which adapter handles a given connection.
External
- None beyond the standard library.