The purpose of a CustomTaskChange (CTC for short) is to execute some arbirtary sql with complex loops and other “strange” things.
To that end, you obviously need a JdbcHelper to handle the hassle of JDBC.
My idea was to use the spring JdbcTemplate class. I can not use it because the Database parameter exposed to the execute method of CTC does not expose the DataSource needed to initialize a spring JdbcTemplate.
I see that liquidbase already has a JdbcTemplate class to that purpose but it missed all the facility to manipulate binded parameters compared to the spring one.
So my questions are :
- is it ok to use the liquibase JdbcTemplate ?
- if it is ok, I think that it would be great to “backport” the spring JdbcTemplate functions that deals with binded parameters to liquibase jdbcTemplate (otherwise, I can create my own subclass of liquibase JdbcTemplate but then all the other users of liquibase will also have to do so)
- or maybe I’m totally misguided and should proceed with another mindset ?