Fork me on GitHub
Jakub Holý (HolyJak)15:10:18

@seancorfield would it be possible to make all Connectibles also Executable, in the same way as it is done for DataSource? So that any custom connectible could be used with execute as is? 🙏


Can you explain, in an issue on GH, what doesn't currently work that you would like to work? I suspect this would be problematic to solve because of connection management. Right now, if Executable isn't implemented for a given type, the assumption is that get-datasource can be called on it, and then DataSource is Executable and knows how to get a connection and close it when it is done.


execute-batch! is a special case because it works with a PreparedStatement and assumes that if you pass it something other than a Connection, it can call get-connection and close that when it is done -- but it has to use runtime type checking to do that and that is a performance hit that other functions must not have.

Jakub Holý (HolyJak)16:10:10

I will do that. Thank you