Database
Database handler base for the server’s db_registry.
Database handler — the core’s minimal contract for a mounted database.
A database declared in the config names a db_class (the imported class
that builds the real db from the connection parameters) and, optionally, a
db_handler_class (default AsgiDbHandlerBase). At mount time the server
builds db_handler_class(db_class(**params)) and registers the handler.
The handler is what lives in the registry and what request.db returns. It
proxies every attribute to the wrapped db via __getattr__ (so the db’s own
interface — execute and the rest — stays transparent), while owning the one
method the core itself calls: closeConnection (registered as a request
cleanup). Concrete db classes and custom handlers live outside the core; the
core only defines this contract.