Package net.hydromatic.sqllogictest
Class ExecutionOptions
- java.lang.Object
-
- net.hydromatic.sqllogictest.ExecutionOptions
-
public class ExecutionOptions extends Object
Extensible command-line parsing. New command-line options can be registered using 'registerOption'.
-
-
Field Summary
Fields Modifier and Type Field Description StringbugsFilebooleandoNotExecutePrintStreamerrStringexecutorPrintStreamoutbooleanstopAtFirstErrorintverbosity
-
Constructor Summary
Constructors Constructor Description ExecutionOptions(boolean exit, PrintStream out, PrintStream err)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(Throwable ex)List<String>getDirectories()@Nullable SqlSltTestExecutorgetExecutor()voidmessage(String message, int importance)Report a message to the user.Set<String>readBugsFile()Read the list of statements and queries to skip from a file.voidregisterExecutor(String executorName, Supplier<SqlSltTestExecutor> executor)voidregisterOption(String option, @Nullable String argName, String description, Function<String,Boolean> optionArgProcessor)StringtoString()
-
-
-
Field Detail
-
out
public final PrintStream out
-
err
public final PrintStream err
-
stopAtFirstError
public boolean stopAtFirstError
-
doNotExecute
public boolean doNotExecute
-
executor
public String executor
-
bugsFile
public String bugsFile
-
verbosity
public int verbosity
-
-
Constructor Detail
-
ExecutionOptions
public ExecutionOptions(boolean exit, PrintStream out, PrintStream err)
-
-
Method Detail
-
readBugsFile
public Set<String> readBugsFile() throws IOException
Read the list of statements and queries to skip from a file. The file can contain comments on lines starting with // Everything else is interpreted as a one-line statement (or query).- Throws:
IOException
-
registerExecutor
public void registerExecutor(String executorName, Supplier<SqlSltTestExecutor> executor)
-
getExecutor
public @Nullable SqlSltTestExecutor getExecutor()
-
registerOption
public void registerOption(String option, @Nullable String argName, String description, Function<String,Boolean> optionArgProcessor)
-
error
public void error(Throwable ex)
-
message
public void message(String message, int importance)
Report a message to the user.- Parameters:
message- Message to report.importance- Importance. Higher means less important.
-
-