Home | Previous Page | Next Page   Creating Java User-Defined Routines >

Java User-Defined Routines

The behaviors of installing and invoking UDRs written in Java code follow the SQLJ: SQL Routines specification. Every UDR written in Java code maps to an external Java static method whose class resides in a Java Archive (JAR) file that was installed in a database. The SQL-to-Java data type mapping is done according to the JDBC specification.

UDRs can be user-defined functions or user-defined procedures, which can return values or not, as follows:

For general information about UDRs, refer to the IBM Informix: User-Defined Routines and Data Types Developer's Guide.

UDRs written in Java code can perform the following tasks.

Type of UDR
Purpose
End-user routine
A UDR that performs some common task for an end user
User-defined aggregate
A UDR that calculates an aggregate value on a PROCEDURE particular column or value
Parallelizable UDR
A UDR that can run in parallel when executed within an SQL statement

(UDRs that open JDBC connections cannot run in parallel.)

Cast function
A UDR that converts or casts one data type to another
Operator function
A UDR that implements some operator symbol (such as +, -, or /)
Iterator function
A user-defined function that returns more than one row of data

Iterator functions written in Java code are supported using some Informix extensions.

Functional index
A UDR on which an index can be built
Opaque data type support
function
A user-defined function that tells the database server how to handle the data of an opaque data type
Negator function
A function that calculates the not operation for a particular operator or function

You cannot use UDRs written in Java code for any of the following features:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]