public class JaninoConnection extends AbstractConnection
For configuration details and examples see overview page.
AbstractConnection.StatementCounter
counter
Constructor and Description |
---|
JaninoConnection(ConnectionParameters parameters)
Instantiates a new connection to Janino Script Evaluator.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection and releases all related resources.
|
void |
executeQuery(Resource queryContent,
ParametersCallback parametersCallback,
QueryCallback queryCallback)
Executes a query specified by its content.
|
void |
executeScript(Resource scriptContent,
ParametersCallback parametersCallback)
Executes a script specified by its content.
|
commit, getDialectIdentifier, getExecutedStatementsCount, isReadonly, rollback, setDialectIdentifier, toString
public JaninoConnection(ConnectionParameters parameters)
parameters
- connection parameters.public void executeScript(Resource scriptContent, ParametersCallback parametersCallback) throws ProviderException
Connection
scriptContent may be used as a key for caching purposes, i.e.
provider may precompile scripts and use compiled versions for subsequent executions.
Please note that only inline text resources
can be safely cached.
scriptContent
- script content. Cannot be null.parametersCallback
- callback to get parameter values. Cannot be null.ProviderException
- if script execution failed.public void executeQuery(Resource queryContent, ParametersCallback parametersCallback, QueryCallback queryCallback) throws ProviderException
queryContent
- query content.parametersCallback
- callback to get parameter values.queryCallback
- callback to call for each result set element produced by this query.ProviderException
- if query execution failed.executeScript(scriptella.spi.Resource, scriptella.spi.ParametersCallback)
public void close() throws ProviderException
ProviderException
- if a critical failure occured.Copyright © Copyright 2006-2019 The Scriptella Project Team.