如何在 H2 中创建过程
这似乎与具有相同标题的其他问题重复,但实际上并非如此。
我们的业务逻辑主要作为 DB2 存储过程来实现(我看到 H2 有一个 DB2 兼容模式 - 很好!)。
我们如何使用 H2 通过这些程序进行内存单元测试?
不幸的是,H2 的语法似乎缺少 CREATE PROCEDURE 命令。
我不想将 Java 函数用作存储过程。如果同样的 sql 文件也可以用于测试和生产,那就最好了...我的要求是否太多了?
编辑:我们还使用 SQL 游标...再次,没有支持的迹象:-(
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 :-(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,兼容模式并没有达到支持 SQL 过程的程度。目前,唯一的解决方案是使用Java函数。抱歉,也不支持 SQL 游标。但我会将这些功能请求添加到路线图中。当然欢迎补丁:-)
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 :-)