Database Drivers
Database Drivers
Database Drivers
Conduit currently supports several database backends through its driver interface:
- SQLite
- PostgreSQL
- MySQL / MariaDB
- SQL Server
- In‑Memory (for testing and ephemeral workloads)
All drivers implement the same core operations:
- Insert
- Update
- Delete
- Get (by primary key)
- List (with limit, offset, filters, ordering)
- Schema introspection
SQLite
SQLite is the default driver for Conduit. It is lightweight, file‑based, and ideal for local development, embedded systems, and small deployments.
Features:
- Full schema introspection via
PRAGMA table_info - Flexible type affinity system
- Fast local performance
- No external server required
Conduit uses the modernc.org/sqlite pure Go driver for maximum portability.
PostgreSQL
PostgreSQL provides strict typing, advanced SQL features, and strong concurrency guarantees. Conduit adapts SQL generation to PostgreSQL’s syntax and placeholder style.
Features:
- Strict type enforcement
- Advanced indexing and constraints
- Placeholder syntax:
$1,$2, … - Robust schema metadata
MySQL / MariaDB
MySQL and MariaDB are widely used in web applications and cloud environments. Conduit supports both through the go-sql-driver/mysql driver.
Features:
- Flexible type coercion
- Placeholder syntax:
? - Broad hosting support
- Fast read performance
SQL Server
SQL Server is supported via the microsoft/go-mssqldb driver. Conduit adapts SQL generation to SQL Server’s parameter syntax and metadata conventions.
Features:
- Placeholder syntax:
@p1,@p2, … - Rich metadata for schema introspection
- Strong enterprise support
In‑Memory Driver
The in‑memory driver is ideal for testing, prototyping, and ephemeral workloads. It stores all tables and rows in Go memory and supports the full CRUD interface.
Features:
- No external dependencies
- Fast operations
- Automatic schema creation
- Perfect for unit tests
Unified Driver Interface
All drivers implement the same Go interface, ensuring consistent behavior across databases:
- Insert
- Update
- Delete
- Get
- List
- Schema introspection
This abstraction allows Conduit to support multiple databases without changing the service layer or API surface.
Notes
- All drivers support the same CRUD and schema operations.
- SQL generation is tailored to each database engine.
- Placeholder syntax varies by driver.
- SQLite is the default driver for local development.
- In‑memory driver is ideal for tests and temporary data.