简体   繁体   中英

Mimic a call to Oracle package function in HSQLDB

I am looking for a way to mimic a call to Oracle package function in my embedded database. I use the following code to call a function:

conn.prepareCall("begin ? := pkg.my_func(?); end;");

The problem is that I couldn't find a way to create a package in HSQLDB.

Create a Schema with the PackageName eg 'pkg', so that the application code will make a call to the procedure with the name 'pkg.proc_name'. From Oracle's DB standpoint although 'pkg' meant but the statement will also work on HSQLDB as it will resolve 'pkg' to the schema and look for the procedure inside it.

Package is in oracle extension, need not be supported by other database vendors. hsqldb does not support packages (it has 'AGGREGATE FUNCTION'. Is that of any use to you?)

You will have to move the business logic from package to a java code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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