Package net.hydromatic.quidem
Class Quidem
java.lang.Object
net.hydromatic.quidem.Quidem
Runs a SQL script.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe information needed to start Quidem.static classBuilds aQuidem.Config.static interfaceCreates a connection for a given name.static interfaceCalled whenever a property's value is changed.static classCommand that executes a SQL statement. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final CommandHandlerA command handler that defines no commands.static final Quidem.ConnectionFactoryThe empty environment.The empty environment.static final Quidem.PropertyHandlerA property handler that does nothing. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a Quidem interpreter with an empty environment and empty connection factory.Quidem(Quidem.Config config) Creates a Quidem interpreter. -
Method Summary
Modifier and TypeMethodDescriptionstatic Quidem.ConfigBuilderCreates aQuidem.ConfigBuilderwith the default settings.voidexecute()Executes the commands from the input, writing to the output, then closing both input and output.booleanReturns whether a SQL query is likely to produce results always in the same order.static voidEntry point from the operating system command line.
-
Field Details
-
DEBUG
public static final boolean DEBUG -
EMPTY_ENV
The empty environment. Returns null for all variables. -
EMPTY_CONNECTION_FACTORY
The empty environment. Returns null for all database names. -
EMPTY_COMMAND_HANDLER
A command handler that defines no commands. -
EMPTY_PROPERTY_HANDLER
A property handler that does nothing.
-
-
Constructor Details
-
Quidem
Creates a Quidem interpreter with an empty environment and empty connection factory. -
Quidem
Creates a Quidem interpreter.
-
-
Method Details
-
configBuilder
Creates aQuidem.ConfigBuilderwith the default settings. -
main
Entry point from the operating system command line.Calls
System.exit(int)with the following status codes:- 0: success
- 1: invalid arguments
- 2: help
- Parameters:
args- Command-line arguments
-
execute
public void execute()Executes the commands from the input, writing to the output, then closing both input and output. -
isProbablyDeterministic
Returns whether a SQL query is likely to produce results always in the same order.If Quidem believes that the order is deterministic, it does not sort the rows before comparing them.
The result is just a guess. Quidem does not understand the finer points of SQL semantics.
- Parameters:
sql- SQL query- Returns:
- Whether the order is likely to be deterministic
-