Change Connection of a QIO to DataSource with Closeable by providing a DataSourceLayer.live instance
which will grab a connection from the data-source, perform the QIO operation, and the immediately release the connection.
Change Connection of a QIO to DataSource with Closeable by providing a DataSourceLayer.live instance
which will grab a connection from the data-source, perform the QIO operation, and the immediately release the connection.
This is used for data-sources that have pooled connections e.g. Hikari.
def ds: DataSource with Closeable = ... run(query[Person]).onDataSource.provide(Has(ds))