java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.util.SqlTokenizer

public class SqlTokenizer extends Object
A statement tokenizer for SQL strings that splits only at delimiters that are at the end of a line or the end of the SQL (row mode). TODO: Add awareness of strings, so that semicolons within strings are not parsed
Version:
$Revision: $
  • Constructor Details

    • SqlTokenizer

      public SqlTokenizer(String sql)
      Creates a new sql tokenizer.
      Parameters:
      sql - The sql text
  • Method Details

    • hasMoreStatements

      public boolean hasMoreStatements()
      Determines whether there are more statements.
      Returns:
      true if there are more statements
    • getNextStatement

      public String getNextStatement()
      Returns the next statement.
      Returns:
      The statement