org.apache.ddlutils.util
Class SqlTokenizer

java.lang.Object
  extended by 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 Summary
SqlTokenizer(String sql)
          Creates a new sql tokenizer.
 
Method Summary
 String getNextStatement()
          Returns the next statement.
 boolean hasMoreStatements()
          Determines whether there are more statements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTokenizer

public SqlTokenizer(String sql)
Creates a new sql tokenizer.

Parameters:
sql - The sql text
Method Detail

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


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.