|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.mojo.sql.SqlSplitter
public final class SqlSplitter
Utility class to split a long sql batch script into single SQL commands.
| Field Summary | |
|---|---|
static int |
NO_END
Value indicating the sql has no end-delimiter like i.e. the semicolon. |
static int |
OVERFLOW_COMMENT
parsed sql started a comment with /_* which continues on the next line (did not end) |
static int |
OVERFLOW_DOUBLE_QUOTE
parsed sql started a double quote static text which continues on the next line (did not end) |
static int |
OVERFLOW_SINGLE_QUOTE
parsed sql started a single quote static text which continues on the next line (did not end) |
| Method Summary | |
|---|---|
static int |
containsSqlEnd(String line,
String delimiter,
int overflowValue)
Check if the given sql line contains a delimiter representing the end of the command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_END
public static final int OVERFLOW_SINGLE_QUOTE
public static final int OVERFLOW_DOUBLE_QUOTE
public static final int OVERFLOW_COMMENT
| Method Detail |
|---|
public static int containsSqlEnd(String line,
String delimiter,
int overflowValue)
line - to parsedelimiter - which should be used to split SQL commandsoverflowValue - 0=none, OVERFLOW_COMMENT,
OVERFLOW_SINGLE_QUOTE or
OVERFLOW_DOUBLE_QUOTE
NO_END if it doesn't contain an end char. OVERFLOW_SINGLE_QUOTE
will be returned if a single quote didn't get closed, OVERFLOW_DOUBLE_QUOTE likewise
for not closed double quotes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||