Package liquibase.changelog

Examples of liquibase.changelog.ChangeLogIterator


          .getParser(this.changeLogFile, getFileOpener())
          .parse(this.changeLogFile, getChangeLogParameters(), getFileOpener());
      checkDatabaseChangeLogTable(true, changeLog, contexts);

      changeLog.validate(database, contexts);
      ChangeLogIterator changeLogIterator = getStandardChangelogIterator(contexts, changeLog);

      changeLogIterator.run(new UpdateVisitor(database), database);
    } finally {
      try {
        lockService.releaseLock();
      } catch (LockException e) {
        LOGGER.error("Error while releasing db lock", e);
View Full Code Here


    }
  }

  private ChangeLogIterator getStandardChangelogIterator(String contexts, DatabaseChangeLog changeLog)
      throws DatabaseException {
    return new ChangeLogIterator(changeLog, new ShouldRunChangeSetFilter(database), new ContextChangeSetFilter(
        contexts), new DbmsChangeSetFilter(database));
  }
View Full Code Here

//        verify(mockLogger).severe(eq("Could not release lock"), any(Exception.class));
//    }

    @Test
    public void getStandardChangelogIterator() throws LiquibaseException {
        ChangeLogIterator iterator = new Liquibase("com/example/changelog.xml", mockResourceAccessor, mockDatabase).getStandardChangelogIterator(new Contexts("a", "b"), new LabelExpression("x", "y"), mockChangeLog);
        assertListsEqual(new Class[] {ShouldRunChangeSetFilter.class,
                ContextChangeSetFilter.class,
                LabelChangeSetFilter.class,
                DbmsChangeSetFilter.class},
                iterator.getChangeSetFilters(), new Assert.AssertFunction() {
            @Override
            public void check(String message, Object expected, Object actual) {
                assertEquals(message, expected, actual.getClass());
            }
        });
View Full Code Here

TOP

Related Classes of liquibase.changelog.ChangeLogIterator

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.