Package org.teiid.translator.jdbc
Class JDBCQueryExecution
- java.lang.Object
-
- org.teiid.translator.jdbc.JDBCBaseExecution
-
- org.teiid.translator.jdbc.JDBCQueryExecution
-
- All Implemented Interfaces:
Execution
,ResultSetExecution
- Direct Known Subclasses:
JDBCDirectQueryExecution
,JDBCProcedureExecution
public class JDBCQueryExecution extends JDBCBaseExecution implements ResultSetExecution
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>[]
columnDataTypes
protected ResultSet
results
protected List<NamedTable>
tempTables
-
Fields inherited from class org.teiid.translator.jdbc.JDBCBaseExecution
command, connection, context, executionFactory, fetchSize, statement, trimString
-
-
Constructor Summary
Constructors Constructor Description JDBCQueryExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Terminates the execution normally.protected boolean
createFullTempTables(QueryExpression qe, boolean usingTxn)
protected boolean
createTempTables(Select select)
void
execute()
Execute the associated command.List<?>
next()
Retrieves the next row of the resultset.-
Methods inherited from class org.teiid.translator.jdbc.JDBCBaseExecution
addStatementWarnings, bind, cancel, getCallableStatement, getConnection, getPreparedStatement, getStatement, setSizeContraints, translateCommand
-
-
-
-
Field Detail
-
results
protected ResultSet results
-
columnDataTypes
protected Class<?>[] columnDataTypes
-
tempTables
protected List<NamedTable> tempTables
-
-
Constructor Detail
-
JDBCQueryExecution
public JDBCQueryExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env)
-
-
Method Detail
-
execute
public void execute() throws TranslatorException
Description copied from interface:Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
createFullTempTables
protected boolean createFullTempTables(QueryExpression qe, boolean usingTxn) throws SQLException, TranslatorException
- Parameters:
qe
-usingTxn
-- Returns:
- Throws:
SQLException
TranslatorException
-
createTempTables
protected boolean createTempTables(Select select) throws SQLException, TranslatorException
- Parameters:
select
-- Returns:
- Throws:
SQLException
TranslatorException
-
next
public List<?> next() throws TranslatorException, DataNotAvailableException
Description copied from interface:ResultSetExecution
Retrieves the next row of the resultset.- Specified by:
next
in interfaceResultSetExecution
- Returns:
- the next row or null indicating that there are no more results
- Throws:
TranslatorException
DataNotAvailableException
-
close
public void close()
Description copied from interface:Execution
Terminates the execution normally.- Specified by:
close
in interfaceExecution
- Overrides:
close
in classJDBCBaseExecution
- See Also:
JDBCBaseExecution.close()
-
-