How to emulate Oracle (+) outer join notation in in-memory database used to run Java unit tests? -
we using hsqldb oracle database syntax(jdbc:hsqldb:mem:testdb;sql.syntax_ora=true) our datalayer unit tests.
(we realize not ideal , better if test against actual oracle db. not option, since want make sure can run our automated tests anywhere. in later step, queries tested in integration tests on actual oracle database, setup similar production database.)
is there way support oracle outer join (+) notation queries hsqldb?
in own opinion should not use (+) notation standard outer join notation instead. however, guys in charge of tuning queries use notation, communication them more difficult/errorprone. although might option if no solution found, not question here.
i found following thread: http://comments.gmane.org/gmane.comp.java.hsqldb.user/5756 queryrewrite patch mentioned there, have necessary hook handle (+) myself, interface never made official hsql release.
is there workaround hsql?
we add query rewriting somewhere in our unit tests themselves(instead of @ test db level), better if can avoid that.
if there no workaround hsql, there other in-memory database/database starteable jar, supports (+) outer join notation?
i think have quoted "easy" possibilities in question.
so remaining approach rewrite query in code before sending on hsqldb.
it should simpler write queries not using (+) notation, , rewrite them (using script) database tuners. rewrite should easier other direction, because standard notation carries more information in structure.
Comments
Post a Comment