How to execute Changes without a changelog?

Hi,


I want to use Liquibase in a model-driven development workflow - as a part of that I need to run some Change objects without wrapping them inside a changeset or changelog. How can I do it? I certainly don’t need any versioning support in this case and I am prepared to directly call the Liquibase API for this purpose.


Regards,

Shantanu

In 2.0, if you have a Change object, you call change.generateStatements() which generates an array of SqlStatement objects. From there, you would use SqlGeneratorFactory.getInstance().generateSql(statement, database) to generate an array of Sql objects, each of which has a .toSql() method that returns the SQL string.


Does that help?


Nathan