Package liquibase.sqlgenerator

Examples of liquibase.sqlgenerator.SqlGeneratorChain


  public void shouldDropIndexInPostgreSQL() throws Exception {
    DropIndexGenerator dropIndexGenerator = new DropIndexGenerator();
    DropIndexStatement statement = new DropIndexStatement("indexName", "defaultCatalog", "defaultSchema", "aTable", null);
    Database database = new PostgresDatabase();
    SortedSet<SqlGenerator> sqlGenerators = new TreeSet<SqlGenerator>();
    SqlGeneratorChain sqlGenerationChain = new SqlGeneratorChain(sqlGenerators);
    Sql[] sqls = dropIndexGenerator.generateSql(statement, database, sqlGenerationChain);
    assertEquals("DROP INDEX \"defaultSchema\".\"indexName\"", sqls[0].toSql());

    statement = new DropIndexStatement("index_name", "default_catalog", "default_schema", "a_table", null);
    sqls = dropIndexGenerator.generateSql(statement, database, sqlGenerationChain);
View Full Code Here

TOP

Related Classes of liquibase.sqlgenerator.SqlGeneratorChain

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.