Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor corrections

The GarinDriver supports JDBC driver level integration with LiquiBase.

Overview:

Simply place garin.jar in your class path and configure your JDBC URL to ensure that LiquiBase schema manager runs automatically as part of the connection life cycle. http://code.google.com/p/garindriver/

...

01| String url = "garin:m=liquibase,s=myFolder/myChangeLog.xml;myContext: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();

...