12

This seems to be a duplicate of the other question with the same title, but it actually isn't.

We have our business logic implemented mostly as DB2 stored procedures (I see that H2 has a DB2-compatibility mode - nice!).

How can we use H2 for in-memory unit testing with these procedures?

Unfortunately H2 seems to lack the CREATE PROCEDURE command from its grammar.

I don't want to use Java functions as stored procedures. It would be best if the very same sql files could be used for testing and production as well... am I asking too much?

EDIT: we also use SQL cursors... again, no sign of support :-(

lospejos
  • 1,976
  • 3
  • 19
  • 35
egbokul
  • 3,944
  • 7
  • 36
  • 54

1 Answers1

7

Unfortunately, the compatibility mode doesn't go as far as supporting SQL prodecures. Currently, the only solution is to use Java functions. SQL cursors are also not supported, sorry. But I will add these feature requests to the roadmap. Patches are welcome of course :-)

Thomas Mueller
  • 48,905
  • 14
  • 116
  • 132
  • Thank you for the response, honestly, I expected something from IBM in this department, so don't feel too bad about it ;-) – egbokul Feb 11 '11 at 18:40