java - What is the appropriate way to do something like defining a user function in SQL during testing? -
for particular integration test backed derby database need introduce user function before execute test.
the steps this:
- start transaction
- create function
- commit transaction >>problem here<<
- execute db operations , test
the problem need commit after creating user function in order use later in query. is case operations affect system tables? can't roll db operations because there has been commit. how roll whole toot?
as remember, ddl statement execution means commit of transaction in progress. so, think place execute sql script of create function, committing transaction there itself.
refer this:
do ddl statements give implicit commit, or can implicit rollback?
Comments
Post a Comment