public class StatementFinder extends Object
Semicolons inside comments, strings, and delimited identifiers are not considered to be statement terminators but to be part of those tokens.
Comments currently recognized include the SQL comment, which begins with "--" and ends at the next EOL, and nested bracketed comments.
Strings and delimited identifiers are permitted to contain newlines; the actual IJ or JSQL parsers will report errors when those cases occur.
There are no escaped characters, i.e. "\n" is considered to be two characters, '\' and 'n'.
| Constructor and Description |
|---|
StatementFinder(com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput s,
com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedOutput promptDest,
String basePath,
Map<String,String> params)
The constructor does not assume the stream is data input
or buffered, so it will wrap it appropriately.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
scala.tools.jline.console.ConsoleReader |
getConsoleReader() |
com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput |
getInput() |
String |
nextStatement(com.pivotal.gemfirexd.internal.impl.tools.ij.ConnectionEnv connEnv,
com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedOutput out)
get the next statement in the input stream.
|
void |
ReInit(com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput s)
Reinit is used to redirect the finder to another stream.
|
public StatementFinder(com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput s,
com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedOutput promptDest,
String basePath,
Map<String,String> params)
s - the input stream for reading statements from.promptDest - LocalizedOutput stream to write line
continuation prompts ("> ") to. If null,
no such prompts will be written.basePath - TODOpublic scala.tools.jline.console.ConsoleReader getConsoleReader()
public com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput getInput()
public void ReInit(com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedInput s)
s - the input stream for reading statements from.public void close()
throws IOException
IOExceptionpublic String nextStatement(com.pivotal.gemfirexd.internal.impl.tools.ij.ConnectionEnv connEnv, com.pivotal.gemfirexd.internal.iapi.tools.i18n.LocalizedOutput out)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.