Class | Description |
---|---|
Driver |
Scriptella Driver for Janino Java Compiler.
|
JaninoConnection |
Scriptella connection adapter for Janino Script Evaluator.
|
JaninoQuery |
A base class for Janino <query> elements.
|
JaninoScript |
A base class for Janino <script> elements.
|
Exception | Description |
---|---|
JaninoProviderException |
Thrown to indicate Janino failure.
|
This driver allows to embed Java code into <query> and <script> elements. This code is compiled by Janino and executed by Scriptella engine. For simple scripting solutions refer to JEXL expression language which is interpreted and less powerful.
Janino scripting elements are implicit subclasses of Query and Script base classes.
Driver class: | scriptella.driver.janino.Driver |
Runtime dependencies: | janino-2.6.1+.jar |
Name | Description | Required |
---|
In other words the script element is an implementation of execute
method of JaninoScript
class.
In other words the query element is an implementation of execute
method of JaninoQuery
class.
<connection driver="janino"/>
<query>
set("name", "John");
next();
<script>
System.out.println("Processing: "+get("name"));
</script>
</query>
In this example the query produces a row having a column name=John.
The child script prints a message using a column from a row produced by setting name to "John" and calling next()
to allow nested content to be executed:
Processing: John
ODBC sample from Scriptella examples distribution also shows several use-cases for Janino.
org.codehaus.janino.source_debugging.enable=true
.Copyright © Copyright 2006-2019 The Scriptella Project Team.