@Test public void multilineComment2() { String original = "--\r\n"+ "-- This is a comment\r\n" + "UPDATE tablename SET column = 1;\r\n" + "GO"; SQLFileChange change = new SQLFileChange(); change.setSql(original); change.setSplitStatements(true); change.setStripComments(true); SqlStatement[] out = change.generateStatements(new MockDatabase()); assertEquals(2, out.length); assertEquals("UPDATE tablename SET column = 1", out[0].toString()); }
@Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); }
SQLFileChange extends AbstractSQLChange { @Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); } }
SQLFileChange extends AbstractSQLChange { @Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); } SQLFileChange(); }
SQLFileChange extends AbstractSQLChange { @Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); } SQLFileChange(); String getPath(); void setPath(String fileName); String getEncoding(); void setEncoding(String encoding); Boolean isRelativeToChangelogFile(); void setRelativeToChangelogFile(Boolean relativeToChangelogFile); @Override void init(); @Override ValidationErrors validate(Database database); @Override Warnings warn(Database database); @Override CheckSum generateCheckSum(); String getConfirmationMessage(); @Override void setSql(String sql); }
SQLFileChange extends AbstractSQLChange { @Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); } SQLFileChange(); String getPath(); void setPath(String fileName); String getEncoding(); void setEncoding(String encoding); Boolean isRelativeToChangelogFile(); void setRelativeToChangelogFile(Boolean relativeToChangelogFile); @Override void init(); @Override ValidationErrors validate(Database database); @Override Warnings warn(Database database); @Override CheckSum generateCheckSum(); String getConfirmationMessage(); @Override void setSql(String sql);  }