insert/update BLOB on ORACLE DB

Hi,


could you tell me about possible way - how to insert/update BLOB on ORACLE DB?


Could I use some extension? 


I saw some discussion on your forum but I didn’t see right way how to do it. 


In the case when insert BLOB isn’t possible: Could you tell me how to integrate modul for it?


Thanks


Standa



Inserting or updating isn’t directly supported by oracle currently. If oracle has a syntax for inserting/updating via SQL without using parameters you can use that in liquibase since it just passes the SQL as given into the JDBC driver. 


If oracle requires using parameters through JDBC to insert/update blobs, you’ll have to write a custom extension (liquibase.org/extensions) to read data from a file and pass it into a PreparedStatement directly


Nathan

Could you give me short example how to do it by extensions?


Thanks 


Standa

Bart, is your code somewhere that the original asker could look at for reference?

Nathan

In fact, it is supported: but the value should be entered in hex in the changeSet.

Also there is a limitation in size you can use over an INSERT statement, and, the syntax might be different for different databases. E.g. 0x or x at the start of the BLOB value.

This all can be resolved: See http://forum.liquibase.org/#Topic/49382000000395001 for more information