Writing a database driver or an ORM
The database layer has two audiences: driver authors who implement a backend and ORM authors who build on the portable connection surface. These focused guides separate the implementation contract from the data model and production traps.
Database authoring guide
Driver shape and implementation — define a backend, handle messages, and run conformance.
Rows and value types — map values without losing portability.
Production pitfalls and errors — connection ownership, cancellation, caching, and failure behavior.
ORM integration and checklist — what an ORM may rely on and the final implementation checklist.
Start with the database API to see the contract drivers implement.