1 | |
package liquibase.sqlgenerator.core; |
2 | |
|
3 | |
import liquibase.database.Database; |
4 | |
import liquibase.exception.ValidationErrors; |
5 | |
import liquibase.sql.Sql; |
6 | |
import liquibase.sqlgenerator.SqlGenerator; |
7 | |
import liquibase.sqlgenerator.SqlGeneratorChain; |
8 | |
import liquibase.sqlgenerator.SqlGeneratorFactory; |
9 | |
import liquibase.statement.core.GetNextChangeSetSequenceValueStatement; |
10 | |
import liquibase.statement.core.SelectFromDatabaseChangeLogStatement; |
11 | |
|
12 | 10 | public class GetNextChangeSetSequenceValueGenerator extends |
13 | |
AbstractSqlGenerator<GetNextChangeSetSequenceValueStatement> { |
14 | |
|
15 | |
public ValidationErrors validate(GetNextChangeSetSequenceValueStatement statement, Database database, |
16 | |
SqlGeneratorChain sqlGeneratorChain) { |
17 | 0 | return new ValidationErrors(); |
18 | |
} |
19 | |
|
20 | |
public Sql[] generateSql(GetNextChangeSetSequenceValueStatement statement, Database database, |
21 | |
SqlGeneratorChain sqlGeneratorChain) { |
22 | 0 | return SqlGeneratorFactory.getInstance().generateSql( |
23 | |
new SelectFromDatabaseChangeLogStatement("MAX(ORDEREXECUTED)"), database); |
24 | |
} |
25 | |
} |