Package org.citrusframework.util
Class SqlUtils
java.lang.Object
org.citrusframework.util.SqlUtils
- Since:
- 2.5
- Author:
- Christoph Deppisch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceLine decorator decorates last script lines with custom logic. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateStatementsFromFileResource(org.springframework.core.io.Resource sqlResource) Reads SQL statements from external file resource.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 Details
-
SQL_COMMENT
Constant representing SQL comment- See Also:
-
STMT_ENDING
Default sql statement ending- See Also:
-
-
Method Details
-
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
Gets the SQL statement ending character sequence.- Parameters:
lineDecorator-- Returns:
-