I am looking for an example on how to use the <whereparams></whereparams>
which belongs to <update></update>
, but I couldn't find anything (even in the official documentation).
any help is much appreciated.thanks.
Running the update-to-tag command To run the update-to-tag command, specify the driver, classpath, and URL in the Liquibase properties file. You can also specify these properties in your command line. Note: Enter the name of the changelog and the tag that you want to use in place of communityOnly.
Liquibase Concepts A change is contained in a changeset and changesets are added to the changelog in the order they need to be deployed. Simply put – a changelog contains an ordered list of changesets, and a changeset contains a change.
An example usage is
<update tableName="updateTest">
<column name="varcharColumn" value="new column 1 value"/>
<column name="dateCol" valueDate="2008-01-01"/>
<column name="intCol" valueNumeric="11"/>
<where>id=:value</where>
<whereParams>
<param valueNumeric="134" />
</whereParams>
</update>
where the :value statements in the <where>
block is replaced with the values in the `param' blocks. If there are multiple :value statements they are replaced in order within the where clause.
However, looking at the code, it looks like the usage of whereParams is not well used or integrated. Perhaps I am missing where it is being picked up, but it may not even be working outside blob/clob updating.
Give it a try and see if it works for you, otherwise I'd say stick with the standard where
block until support is improved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With