如何在H2中创建过程 [英] How to CREATE PROCEDURE in H2

查看:151
本文介绍了如何在H2中创建过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎与另一个具有相同标题的问题重复,但实际上并非如此。

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

我们的业务逻辑主要实现为DB2存储程序(我看到H2有一个DB2兼容模式 - 很好!)。

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

我们如何使用H2来进行内存单元测试?

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

不幸的是,H2似乎缺乏来自其的CREATE PROCEDURE命令语法

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

我不想使用Java函数存储过程。这将是最好的,如果相同的sql文件可以用于测试和生产以及...我要求太多?

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?

编辑:我们也使用SQL游标...再次,没有支持的迹象: - (

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

推荐答案

不幸的是,兼容性模式不支持目前,唯一的解决方案是使用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 :-)

这篇关于如何在H2中创建过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆