Package liquibase.sqlgenerator.core
Class CreateProcedureGenerator
- java.lang.Object
-
- liquibase.sqlgenerator.core.AbstractSqlGenerator<CreateProcedureStatement>
-
- liquibase.sqlgenerator.core.CreateProcedureGenerator
-
- All Implemented Interfaces:
PrioritizedService,SqlGenerator<CreateProcedureStatement>
public class CreateProcedureGenerator extends AbstractSqlGenerator<CreateProcedureStatement>
-
-
Field Summary
-
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR
-
Fields inherited from interface liquibase.sqlgenerator.SqlGenerator
EMPTY_SQL, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description CreateProcedureGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringaddSchemaToText(String procedureText, String schemaName, String keywordBeforeName, Database database)Convenience method for other classes similar to this that want to be able to modify the procedure text to add the schemaSql[]generateSql(CreateProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)Generate the actual Sql for the given statement and database.static StringremoveTrailingDelimiter(String procedureText, String endDelimiter)booleansupports(CreateProcedureStatement statement, Database database)Does this generator support the given statement/database combination? Do not validate the statement with this method, only return if it can support it.static voidsurroundWithSchemaSets(List<Sql> sql, String schemaName, Database database)Convenience method for when the schemaName is set but we don't want to parse the bodyValidationErrorsvalidate(CreateProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)Validate the data contained in the SqlStatement.-
Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, generateStatementsIsVolatile, getPriority, looksLikeFunctionCall, warn
-
-
-
-
Method Detail
-
supports
public boolean supports(CreateProcedureStatement statement, Database database)
Description copied from interface:SqlGeneratorDoes this generator support the given statement/database combination? Do not validate the statement with this method, only return if it can support it.- Specified by:
supportsin interfaceSqlGenerator<CreateProcedureStatement>- Overrides:
supportsin classAbstractSqlGenerator<CreateProcedureStatement>
-
validate
public ValidationErrors validate(CreateProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
Description copied from interface:SqlGeneratorValidate the data contained in the SqlStatement. If there are no errors, return an empty ValidationErrors object, not a null value. Liquibase will inspect the ValidationErrors result before attempting to call generateSql.
-
generateSql
public Sql[] generateSql(CreateProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
Description copied from interface:SqlGeneratorGenerate the actual Sql for the given statement and database.
-
removeTrailingDelimiter
public static String removeTrailingDelimiter(String procedureText, String endDelimiter)
-
surroundWithSchemaSets
public static void surroundWithSchemaSets(List<Sql> sql, String schemaName, Database database)
Convenience method for when the schemaName is set but we don't want to parse the body
-
-