Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

01| String url = "garin:m=liquibase,s=tst/liquidbase/changelogmyFolder/myChangeLog.xml;demomyContext:jdbc:mysql://localhost/garinDB";
02| Connection c = DriverManager.getConnection(url, "garinAgent","bigboy");
03| Statement s = c.createStatement();
04| ResultSet r = s.executeQuery("SELECT count( * ) FROM news");
05| r.next();
06| int rowCount = r.getInt(1);
07| System.out.println("ROW COUNT: " + rowCount);
08| r.close();
09| s.close();
10| c.close();

In this example the liquibase schema manager runs with "changelogmyChangeLog.xml" and a context of "demomyContext". The schema manger will run when line 02 is executed since GarinDriver automatically runs LiquiBase at connection initialization.

...