Extracted from the middleware concept, this will just be a new type of connectable (and transactable?) that will wrap an existing connectable (transactable) in a record type that also includes default options.
It will be implemented for plan, execute-one!, execute! (via their protocol implementations in next.jdbc.result-set) and for transact (via its protocol implementation in next.jdbc.transaction).
next.jdbc.default-options will contain the record type (and will be ^:no-doc like next.jdbc.transaction). next.jdbc will get a new with-options function that just invokes the constructor. next.jdbc.result-set and next.jdbc.transaction will provide implementations of the executable and transactable protocols that simply invoke the protocols on the wrapped connectable with the merged options.
Extracted from the middleware concept, this will just be a new type of connectable (and transactable?) that will wrap an existing connectable (transactable) in a record type that also includes default options.
It will be implemented for
plan
,execute-one!
,execute!
(via their protocol implementations innext.jdbc.result-set
) and fortransact
(via its protocol implementation innext.jdbc.transaction
).next.jdbc.default-options
will contain the record type (and will be^:no-doc
likenext.jdbc.transaction
).next.jdbc
will get a newwith-options
function that just invokes the constructor.next.jdbc.result-set
andnext.jdbc.transaction
will provide implementations of the executable and transactable protocols that simply invoke the protocols on the wrapped connectable with the merged options.