public class Quidem extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Quidem.ConnectionFactory
Creates a connection for a given name.
|
static interface |
Quidem.NewConnectionFactory
Deprecated.
|
static interface |
Quidem.PropertyHandler
Called whenever a property's value is changed.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static Quidem.ConnectionFactory |
EMPTY_CONNECTION_FACTORY
The empty environment.
|
static com.google.common.base.Function<String,Object> |
EMPTY_ENV
The empty environment.
|
static Quidem.PropertyHandler |
EMPTY_PROPERTY_HANDLER
A property handler that does nothing.
|
| Constructor and Description |
|---|
Quidem(Reader reader,
Writer writer)
Creates a Quidem interpreter with an empty environment and empty
connection factory.
|
Quidem(Reader reader,
Writer writer,
com.google.common.base.Function<String,Object> env,
Quidem.ConnectionFactory connectionFactory)
Creates a Quidem interpreter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the commands from the input, writing to the output,
then closing both input and output.
|
boolean |
isProbablyDeterministic(String sql)
Returns whether a SQL query is likely to produce results always in the
same order.
|
static void |
main(String[] args)
Entry point from the operating system command line.
|
void |
setStackLimit(int stackLimit)
Sets the maximum number of characters of an error stack to be printed.
|
Quidem |
withConnectionFactory(Quidem.ConnectionFactory connectionFactory)
Creates an instance that uses a given connection factory.
|
Quidem |
withPropertyHandler(Quidem.PropertyHandler propertyHandler)
Creates an instance that uses a given property handler.
|
public static final boolean DEBUG
public static final com.google.common.base.Function<String,Object> EMPTY_ENV
public static final Quidem.ConnectionFactory EMPTY_CONNECTION_FACTORY
public static final Quidem.PropertyHandler EMPTY_PROPERTY_HANDLER
public Quidem(Reader reader, Writer writer)
public Quidem(Reader reader, Writer writer, com.google.common.base.Function<String,Object> env, Quidem.ConnectionFactory connectionFactory)
public Quidem withConnectionFactory(Quidem.ConnectionFactory connectionFactory)
public Quidem withPropertyHandler(Quidem.PropertyHandler propertyHandler)
public static void main(String[] args)
Calls System.exit(int) with the following status codes:
args - Command-line argumentspublic void execute()
public void setStackLimit(int stackLimit)
If negative, does not limit the stack size.
The default is DEFAULT_MAX_STACK_LENGTH.
Useful because it prevents diff from running out of memory if
the error stack is very large. It is preferable to produce a result where
you can see the first N characters of each stack trace than to produce
no result at all.
stackLimit - Maximum number of characters to print of each stack
tracepublic boolean isProbablyDeterministic(String sql)
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.
sql - SQL queryCopyright © 2014–2016 Julian Hyde. All rights reserved.