AppLib GET SCRIPTING ENGINES

From LucidDB Wiki
Jump to: navigation, search

Contents

Declaration

create or replace function applib.get_scripting_engines()
returns table(script_engine varchar(65535),
engine_version varchar(65535),
engine_language varchar(65535),
language_version varchar(65535),
engine_alias varchar(65535))
language java
parameter style system defined java
no sql
external name 'applib.applibJar:org.eigenbase.applib.script.ExecuteScriptUdr.getScriptingEngines';

Syntax

SELECT * FROM TABLE(APPLIB.GET_SCRIPTING_ENGINES());

Purpose

This function is a quick way to learn what scripting engines LucidDB knows about as well as their aliases to pass to the other scripting functions.

Output

  • SCRIPT_ENGINE: Official name of the script engine.
  • ENGINE_VERSION: Version number of the engine in use.
  • ENGINE_LANGUAGE: Language of the engine.
  • LANGUAGE_VERSION: Version number of the language.
  • ENGINE_ALIAS: Alias to get the engine by name. (Can be passed into the other routines.)

Example

0: jdbc:luciddb:http://localhost> select * from table(applib.get_scripting_engines());
+---------------------------+-----------------+------------------+-------------------+---------------+
|       SCRIPT_ENGINE       | ENGINE_VERSION  | ENGINE_LANGUAGE  | LANGUAGE_VERSION  | ENGINE_ALIAS  |
+---------------------------+-----------------+------------------+-------------------+---------------+
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | js            |
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | rhino         |
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | JavaScript    |
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | javascript    |
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | ECMAScript    |
| Mozilla Rhino             | 1.6 release 2   | ECMAScript       | 1.6               | ecmascript    |
|                           |                 |                  |                   |               |
| jython                    | 2.5.1           | python           | 2.5               | python        |
| jython                    | 2.5.1           | python           | 2.5               | jython        |
|                           |                 |                  |                   |               |
| Clojure Scripting Engine  | 1.2             | Clojure          | 1.2               | Clojure       |
|                           |                 |                  |                   |               |
+---------------------------+-----------------+------------------+-------------------+---------------+
12 rows selected (0.187 seconds)
0: jdbc:luciddb:http://localhost> 
Product Documentation