Class SQLScriptUtil


  • public final class SQLScriptUtil
    extends Object
    Contains utility methods for working with SQL script.
    • Method Detail

      • getCommandsFromScript

        public static List<String> getCommandsFromScript​(File script,
                                                         DatabaseType databaseType)
                                                  throws IOException
        Extracts SQL commands from SQL script. It parses SQL script and divides it to single commands.
        Parameters:
        script - Script from which SQL commands are extracted.
        databaseType - Database system type for which is the script written.
        Returns:
        A list of SQL commands that are in specified script. If there are no commands in the script, returns empty list. Never returns null.
        Throws:
        IOException