Class ConcurrentTestCommandScript.PrepareCommand
- java.lang.Object
-
- org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.AbstractCommand
-
- org.apache.calcite.test.concurrent.ConcurrentTestCommandScript.PrepareCommand
-
- All Implemented Interfaces:
ConcurrentTestCommand
- Enclosing class:
- ConcurrentTestCommandScript
private class ConcurrentTestCommandScript.PrepareCommand extends ConcurrentTestCommandGenerator.AbstractCommand
PrepareCommand creates aPreparedStatement
, which is saved as the current statement of its test thread. For a preparted query (a SELECT or a CALL with results), a subsequent FetchAndPrintCommand executes the statement and fetches its reults, until end-of-data or a timeout. A PrintCommand attaches a listener, called for each rows, that selects rows to save and print, and sets the format. By default, if no PrintCommand appears before a FetchAndPrintCommand, all rows are printed. A CloseCommand closes and discards the prepared statement.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.test.concurrent.ConcurrentTestCommand
ConcurrentTestCommand.ShouldHaveFailedException
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
sql
-
Constructor Summary
Constructors Modifier Constructor Description private
PrepareCommand(java.lang.String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExecute(ConcurrentTestCommandExecutor executor)
-
Methods inherited from class org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.AbstractCommand
execute, isFailureExpected, markToFail, markToFail
-
-
-
-
Method Detail
-
doExecute
protected void doExecute(ConcurrentTestCommandExecutor executor) throws java.sql.SQLException
- Specified by:
doExecute
in classConcurrentTestCommandGenerator.AbstractCommand
- Throws:
java.sql.SQLException
-
-