org.codehaus.mojo.sql
Class SqlSplitter
java.lang.Object
org.codehaus.mojo.sql.SqlSplitter
public class SqlSplitter
- extends Object
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. |
Method Summary |
static int |
containsSqlEnd(String line,
String delimiter)
Check if the given sql line contains an end of command ';' Please note
that we do not fully parse the SQL, so if we get a malformed
statement, we cannot detect it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_END
public static final int NO_END
- Value indicating the sql has no end-delimiter like i.e. semicolon
- See Also:
- Constant Field Values
SqlSplitter
public SqlSplitter()
containsSqlEnd
public static int containsSqlEnd(String line,
String delimiter)
- Check if the given sql line contains an end of command ';' Please note
that we do not fully parse the SQL, so if we get a malformed
statement, we cannot detect it.
- Parameters:
line
- to parsedelimiter
- which should be used to split SQL commands
- Returns:
- position after the end character if the given line contains the
end of a SQL script, if it doesn't
contain an end char.
Copyright © 2006-2011 The Kuali Foundation. All Rights Reserved.