| java.lang.Object liquibase.change.AbstractChange liquibase.change.AbstractSQLChange
All known Subclasses: liquibase.change.RawSQLChange, liquibase.change.SQLFileChange,
AbstractSQLChange | abstract public class AbstractSQLChange extends AbstractChange (Code) | | A common parent for all SQL related changes regardless of where the sql was sourced from.
Implements the necessary logic to choose how it should be parsed to generate the statements.
author: Paul Keeble |
generateStatements | public SqlStatement[] generateStatements(Database database) throws UnsupportedChangeException(Code) | | Generates one or more statements depending on how the SQL should be parsed.
If split statements is set to true then the SQL is split on the ; and go\n entries
found in the sql text and each is made a separate statement.
If stripping comments is true then any comments after -- on a line and any comments
between /* and \*\/ will be stripped before the splitting is executed.
The end result is one or more SQL statements split in the way the user requested
|
isSplittingStatements | public boolean isSplittingStatements()(Code) | | true if a multi-line file will be split, otherwise false |
isStrippingComments | public boolean isStrippingComments()(Code) | | true if stripping comments, otherwise false |
setSplitStatements | public void setSplitStatements(Boolean splitStatements)(Code) | | If set to true then the sql will be split around any ; and \ngo\n entries in the sql and
each line provided as a separate statement.
Parameters: splitStatements - set true if the SQL should be split, otherwise false |
setSql | public void setSql(String sql)(Code) | | The raw SQL to use for this change.
|
setStripComments | public void setStripComments(Boolean stripComments)(Code) | | Parameters: stripComments - true if comments should be stripped out, otherwise false |
Methods inherited from liquibase.change.AbstractChange | public boolean canRollBack()(Code)(Java Doc) protected Change[] createInverses()(Code)(Java Doc) public void executeRollbackStatements(Database database) throws JDBCException, UnsupportedChangeException, RollbackImpossibleException(Code)(Java Doc) public void executeStatements(Database database) throws JDBCException, UnsupportedChangeException(Code)(Java Doc) public SqlStatement[] generateRollbackStatements(Database database) throws UnsupportedChangeException, RollbackImpossibleException(Code)(Java Doc) public String getChangeName()(Code)(Java Doc) public ChangeSet getChangeSet()(Code)(Java Doc) public FileOpener getFileOpener()(Code)(Java Doc) public String getMD5Sum()(Code)(Java Doc) public String getTagName()(Code)(Java Doc) public void saveRollbackStatement(Database database, Writer writer) throws IOException, UnsupportedChangeException, RollbackImpossibleException, StatementNotSupportedOnDatabaseException(Code)(Java Doc) public void saveStatements(Database database, Writer writer) throws IOException, UnsupportedChangeException, StatementNotSupportedOnDatabaseException(Code)(Java Doc) public void setChangeSet(ChangeSet changeSet)(Code)(Java Doc) public void setFileOpener(FileOpener fileOpener)(Code)(Java Doc) public void setUp() throws SetupException(Code)(Java Doc)
|
|
|