dimanche 19 janvier 2020

Is it possible to use $$ as delimiter/separator in sql statement for testcontainer?

We're using testcontainers in integration test with DB. To setup initial state of DB we use container method withInitScript(*pathToScript*). Under the hood it uses org.postgresql.jdbc.PgStatement class to execute query. But an executing fails if sqlQuery contains function/procedure with $$ delimiter. The solution is to replace $$ with ', but it takes long time to control test dump and keep in mind necessity of replacing delimiter.

There is related question, but no solution: Exception in JPA when using seed file for PostgreSQL

Is it possible to point a type of delimiter or something like that?

Aucun commentaire:

Enregistrer un commentaire