简体   繁体   English

jdbc中的HSQL参考自定义类型create array语句

[英]HSQL reference custom type in jdbc create array statement

I currently get an SQLException when invoking the createArrayOf(String,Object) of the Connection class. 当前,当调用Connection类的createArrayOf(String,Object)时,我得到一个SQLException。 My database is HSQL and the code used to generate the type is as follows: 我的数据库是HSQL,用于生成类型的代码如下:

create type FOO as BIGINT;

The java code I am invoking is as follows: 我正在调用的Java代码如下:

Connection conn = createConnection();  
conn.createArrayOf("MySchema.FOO",data);

This also fails: 这也会失败:

Connection conn = createConnection();  
conn.createArrayOf("FOO",data);

The resulting output is: 结果输出为:

Invalid argument in JDBC call: FOO JDBC调用中的参数无效:FOO

My question is how can I bind to a type that exists in a HSQL database, this is not an in memory instance. 我的问题是如何绑定到HSQL数据库中存在的类型,这不是内存中的实例。

User defined types are not currently supported as arguments to this method. 当前不支持将用户定义的类型用作此方法的参数。 You can use "BIGINT". 您可以使用“ BIGINT”。 Future versions of HSQLDB may support user defined type arguments. HSQLDB的未来版本可能支持用户定义的类型参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM