Using Cloudscape’s Java Extensions,
Page 2 of 12


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

Java and SQL-J Integration

SQL-J gives you the ability to work with Java classes and objects. Cloudscape can access all Java classes that are available to the JVM in which it is running. This means that you can execute Java methods within Cloudscape (see “Invoking Methods and Accessing Fields”). You can also store serialized forms of objects in the database (see “Storing Java Objects in Cloudscape Tables”).

Java extensions to the syntax are integrated with the SQL. You don’t have to use standard SQL syntax in one place, then switch into another environment and use Java. Instead, the boundaries between them are relaxed. Consider the following simple SQL-J statement:

SELECT country.toUpperCase()
FROM Countries

In this example, country is a standard SQL-92 VARCHAR column, but toUpperCase is a method that belongs to the java.lang.String class. Cloudscape lets you execute Java methods on SQL data types. The rest of this section goes into more detail on the Java part of SQL-J. For complete details of the SQL-J language, see the Cloudscape Reference Manual.

NOTE: To use user-defined data types, known as Java data types, the classes for those types must be available to the JVM in which Cloudscape is running (installed and in the class path or stored in a jar file in the database and in the database class path). See “Deploying Java Classes for Use as Java Data Types”. The classes for basic JDK data types and for Cloudscape-supplied data types are always available.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.