public boolean apply(SQLAlterTableStatement alter) { if (!SQLUtils.nameEquals(alter.getName(), this.getName())) { return false; } int applyCount = 0; for (SQLAlterTableItem item : alter.getItems()) { if (alterApply(item)) { applyCount++; } } return applyCount > 0; }
protected boolean alterApply(SQLAlterTableItem item) { if (item instanceof MySqlAlterTableAlterColumn) { return apply((MySqlAlterTableAlterColumn) item); } else if (item instanceof MySqlAlterTableChangeColumn) { return apply((MySqlAlterTableChangeColumn) item); } else if (item instanceof SQLAlterCharacter) { return apply((SQLAlterCharacter) item); } else if (item instanceof MySqlAlterTableModifyColumn) { return apply((MySqlAlterTableModifyColumn) item); } else if (item instanceof MySqlAlterTableOption) { return apply((MySqlAlterTableOption) item); } return super.alterApply(item); }
public boolean apply(SQLAlterTableStatement alter) { if (!SQLUtils.nameEquals(alter.getName(), this.getName())) { return false; } int applyCount = 0; for (SQLAlterTableItem item : alter.getItems()) { if (alterApply(item)) { applyCount++; } } return applyCount > 0; }
protected boolean alterApply(SQLAlterTableItem item) { if (item instanceof MySqlAlterTableAlterColumn) { return apply((MySqlAlterTableAlterColumn) item); } else if (item instanceof MySqlAlterTableChangeColumn) { return apply((MySqlAlterTableChangeColumn) item); } else if (item instanceof SQLAlterCharacter) { return apply((SQLAlterCharacter) item); } else if (item instanceof MySqlAlterTableModifyColumn) { return apply((MySqlAlterTableModifyColumn) item); } else if (item instanceof MySqlAlterTableOption) { return apply((MySqlAlterTableOption) item); } return super.alterApply(item); }