runtime:db
The runtime:db API is a portable connection surface with an explicit driver. Read the part you need:
Connections and pooling — imports,
connect(), connection options, and cancellation.Queries, rows, and errors — SQL templates, execution, subscriptions, transactions, rows, and error codes.
Database drivers — the driver contract and value mapping.
For implementation guidance, see Writing a database driver or an ORM.