DROP JAR

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > DROP statements >

DROP JAR

Previous pageReturn to chapter overviewNext page

SQLstream supports the creation of user-defined functions defined externally in Java archive (JAR) files. These external JAR files are loaded into SQLstream s-Server using CREATE JAR, and unloaded using DROP JAR.

For more detail, see the topic DROP FUNCTION in this guide.

Syntax

DROP JAR <qualified-jar-name> OPTIONS( <integer> ) [CASCADE | RESTRICT ]

Notes

The OPTIONS clause exists for future use; at this time the only valid OPTIONS value is zero.

If RESTRICT is specified, and classes in the JAR file are still being referenced by other objects in the system (such as a user defined function created using CREATE FUNCTION), an exception will occur and the JAR file will not be unloaded.

If CASCADE is specified, and classes in the JAR file are still being referenced by other objects in the system (such as a user defined function created using CREATE FUNCTION), the JAR file will be unloaded and any objects that depend on it will be deleted.

If neither RESTRICT nor CASCADE is explicitly specified, the default behavior is RESTRICT.

Examples

Assume a jar file as loaded into the system using:

CREATE JAR gpsJar LIBRARY 'file:/home/aspen/gps.jar' OPTIONS(0);

 

Unload the jar file /home/aspen/gps.jar if it is not currently being referenced:

DROP JAR gpsJar OPTIONS(0);

 

Unload the jar file /home/aspen/gps.jar and any functions that reference it:

DROP JAR gpsJar OPTIONS(0) CASCADE;