This module provides a database component and functionality for
working with database connections.
Returns #t when v is a database component.
Returns a function that will create a database component containing
a DB connection pool of size #:max-connections which
connects to the database using the connector.
Retrieves a database connection from the pool and passes it to
proc. Once proc completes, the connection is
returned to the pool.
Nested calls to call-with-database-connection reuse the
Retrieves a database connection from the pool, enters a transaction
with the requested #:isolation level and passes the
connection to proc. If proc completes
successfully, the transaction is committed, otherwise it is rolled
Nested calls to call-with-database-transaction reuse the
same connection and, if the database supports it, create nested
|maybe-isolation|| ||=|| |
| || ||||| ||#:isolation isolation|
| ||isolation|| ||:|| |
For example, the following forms are equivalent: