Class SQLScriptUtil
- java.lang.Object
-
- org.jbpm.test.persistence.scripts.util.SQLScriptUtil
-
public final class SQLScriptUtil extends Object
Contains utility methods for working with SQL script.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
getCommandsFromScript(File script, DatabaseType databaseType)
Extracts SQL commands from 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
-
-