Add hook to allow operations on PreparedStatement prior to query execution
Description
It would be very useful to be able to pass in a function argument to several c.j.j functions that would be called on the PreparedStatement before executing the query, for example, calling setFetchSize(). I'm not sure what the syntax should look like for this...
Environment
None
Activity
Sean Corfield
August 10, 2011 at 8:23 AM
Users have verified that being able to specify :fetch-size in with-query-results handles the common use cases for performance.
Sean Corfield
July 18, 2011 at 4:02 AM
Added prepare-statement* to jdbc.internal which takes a connection, a SQL string and a map of options; returns a PreparedStatement. Will expose this in top-level.
with-query-results now allows the first element in the sql-params vector to be either:
PreparedStatement object created by the user
map of options passed to prepare-statement* in order to create the PreparedStatement
Options supported are in the docstring. May add additional post-creation options (beyond fetch-size and max-rows).
It would be very useful to be able to pass in a function argument to several c.j.j functions that would be called on the PreparedStatement before executing the query, for example, calling setFetchSize(). I'm not sure what the syntax should look like for this...