Coverage Report - liquibase.sqlgenerator.core.RawSqlGenerator
 
Classes in this File Line Coverage Branch Coverage Complexity
RawSqlGenerator
80%
4/5
N/A
1
 
 1  
 package liquibase.sqlgenerator.core;
 2  
 
 3  
 import liquibase.database.Database;
 4  
 import liquibase.exception.ValidationErrors;
 5  
 import liquibase.sql.Sql;
 6  
 import liquibase.sql.UnparsedSql;
 7  
 import liquibase.sqlgenerator.SqlGenerator;
 8  
 import liquibase.sqlgenerator.SqlGeneratorChain;
 9  
 import liquibase.statement.core.RawSqlStatement;
 10  
 
 11  26
 public class RawSqlGenerator extends AbstractSqlGenerator<RawSqlStatement> {
 12  
 
 13  
     public ValidationErrors validate(RawSqlStatement rawSqlStatement, Database database,
 14  
             SqlGeneratorChain sqlGeneratorChain) {
 15  16
         ValidationErrors validationErrors = new ValidationErrors();
 16  16
         validationErrors.checkRequiredField("sql", rawSqlStatement.getSql());
 17  16
         return validationErrors;
 18  
     }
 19  
 
 20  
     public Sql[] generateSql(RawSqlStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
 21  0
         return new Sql[] { new UnparsedSql(statement.getSql(), statement.getEndDelimiter()) };
 22  
     }
 23  
 }