Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write custom functions for in memory HSQL

I want to write a simple function in HSQL so that it is backwards compatible with DB2 functions. In theory I should be able to write a custom function in java and hook it into HSQL. Is there any direction/documentation on just that?

like image 424
Zombies Avatar asked Jan 18 '11 18:01

Zombies


People also ask

What does H in Hsqldb stand for?

(Learn how and when to remove this template message) HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards.

Is Hsqldb in-memory?

HSQLDB (HyperSQL DataBase) is the leading SQL relational database system written in Java. It offers a small, fast multithreaded and transactional database engine with in-memory and disk-based tables and supports embedded and server modes.

What is the use of Hsqldb?

HSQLDB is used for development, testing, and deployment of database applications. The main and unique feature of HSQLDB is Standard Compliance. It can provide database access within the user's application process, within an application server, or as a separate server process.


1 Answers

User defined functions are documented in the HSQLDB Guide. See this section for functions written in Java.

http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html#src_jrt_routines

You can also write your functions in SQL, which is documented in the same chapter of the Guide.

like image 135
fredt Avatar answered Oct 03 '22 00:10

fredt