DB.withConnection<R,E,>(connector: DBConnector,fn: (db: DB) => Task<R, E>,): Task<R, E | ConnectionFailed>
Execute operations with a connection acquired from the connector. The connection is automatically released after the operation completes, whether successful or failed.
connector: DBConnector
Task<R, E | ConnectionFailed>