Package com.consol.citrus.util
Class SqlUtils
- java.lang.Object
-
- com.consol.citrus.util.SqlUtils
-
public abstract class SqlUtils extends Object
- Since:
- 2.5
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSqlUtils.LastScriptLineDecoratorLine decorator decorates last script lines with custom logic.
-
Field Summary
Fields Modifier and Type Field Description static StringSQL_COMMENTConstant representing SQL commentstatic StringSTMT_ENDINGDefault sql statement ending
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>createStatementsFromFileResource(org.springframework.core.io.Resource sqlResource)Reads SQL statements from external file resource.static List<String>createStatementsFromFileResource(org.springframework.core.io.Resource sqlResource, SqlUtils.LastScriptLineDecorator lineDecorator)Reads SQL statements from external file resource.static StringgetStatementEndingCharacter(SqlUtils.LastScriptLineDecorator lineDecorator)Gets the SQL statement ending character sequence.
-
-
-
Field Detail
-
SQL_COMMENT
public static final String SQL_COMMENT
Constant representing SQL comment- See Also:
- Constant Field Values
-
STMT_ENDING
public static final String STMT_ENDING
Default sql statement ending- See Also:
- Constant Field Values
-
-
Method Detail
-
createStatementsFromFileResource
public static List<String> createStatementsFromFileResource(org.springframework.core.io.Resource sqlResource)
Reads SQL statements from external file resource. File resource can hold several multi-line statements and comments.- Parameters:
sqlResource- the sql file resource.- Returns:
- list of SQL statements.
-
createStatementsFromFileResource
public static List<String> createStatementsFromFileResource(org.springframework.core.io.Resource sqlResource, SqlUtils.LastScriptLineDecorator lineDecorator)
Reads SQL statements from external file resource. File resource can hold several multi-line statements and comments.- Parameters:
sqlResource- the sql file resource.lineDecorator- optional line decorator for last script lines.- Returns:
- list of SQL statements.
-
getStatementEndingCharacter
public static String getStatementEndingCharacter(SqlUtils.LastScriptLineDecorator lineDecorator)
Gets the SQL statement ending character sequence.- Parameters:
lineDecorator-- Returns:
-
-