package org.insightech.er.db.impl.access;
import org.insightech.er.editor.model.ERDiagram;
import org.insightech.er.editor.model.dbexport.ddl.DDLCreator;
import org.insightech.er.editor.model.diagram_contents.element.node.table.ERTable;
import org.insightech.er.editor.model.diagram_contents.element.node.table.index.Index;
import org.insightech.er.editor.model.diagram_contents.not_element.tablespace.Tablespace;
public class AccessDDLCreator extends DDLCreator {
public AccessDDLCreator(ERDiagram diagram, boolean semicolon) {
super(diagram, semicolon);
}
@Override
public String getDropDDL(Index index, ERTable table) {
StringBuilder ddl = new StringBuilder();
ddl.append("DROP INDEX ");
ddl.append(this.getIfExistsOption());
ddl.append(filter(index.getName()));
ddl.append(" ON ");
ddl.append(filter(table.getNameWithSchema(this.getDiagram()
.getDatabase())));
if (this.semicolon) {
ddl.append(";");
}
return ddl.toString();
}
@Override
protected String getDDL(Tablespace object) {
return null;
}
}