Class SqlParser


  • public class SqlParser
    extends Object
    SQL parser.
    • Constructor Detail

      • SqlParser

        public SqlParser​(@Nullable
                         @Nullable String schemaName,
                         String sql)
        Constructor.
        Parameters:
        schemaName - Schema name.
        sql - Original SQL.
    • Method Detail

      • nextCommand

        public SqlCommand nextCommand()
        Get next command.
        Returns:
        Command or null if end of script is reached.
      • remainingSql

        public String remainingSql()
        Not yet parsed part of the sql query. Result is invalid if parsing error was thrown.
      • lastCommandSql

        public String lastCommandSql()
        Last successfully parsed sql statement. It corresponds to the last command returned by nextCommand().