org.eigenbase.jmi
Interface JmiPreparedQuery

All Known Implementing Classes:
LurqlQueryProcessor.PreparedQuery

public interface JmiPreparedQuery

JmiPreparedQuery represents a prepared query returned by JmiQueryProcessor.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/jmi/JmiPreparedQuery.java#8 $
Author:
John V. Sichi

Method Summary
 Map<String,?> describeParameters()
          Gets a description of the parameters to this query.
 Collection<RefObject> execute(Connection connection, Map<String,?> args)
          Executes the prepared query.
 String explainPlan()
          Gets an explanation of the plan to be used to execute this query.
 

Method Detail

describeParameters

Map<String,?> describeParameters()
Gets a description of the parameters to this query.

Returns:
map from parameter name (String) to expected type (type representation is implementation-dependent)

explainPlan

String explainPlan()
Gets an explanation of the plan to be used to execute this query.

Returns:
plan text; representation is implementation-defined, typically multi-line

execute

Collection<RefObject> execute(Connection connection,
                              Map<String,?> args)
                              throws JmiQueryException
Executes the prepared query. Whether it is legal to simultaneously execute the same query from different threads is implementation-dependent. The query transaction scope is determined by the current thread context and JMI implementation.

Parameters:
connection - JDBC connection to use for processing SQL subqueries, or null if none available
args - map from parameter name (String) to argument value (allowable value type is implementation-dependent)
Returns:
collection of JMI objects (instances of RefObject) found by the query
Throws:
JmiQueryException