public boolean visit(SQLDeleteStatement x) { setAliasMap(); setMode(x, Mode.Delete); String tableName = x.getTableName().toString(); setCurrentTable(tableName); if (x.getAlias() != null) { this.aliasMap.put(x.getAlias(), tableName); } TableStat stat = getTableStat(tableName); stat.incrementDeleteCount(); accept(x.getWhere()); return false; }
public static void setDataSource(MappingEngine engine, SQLDeleteStatement stmt) { if (stmt.getExprTableSource() == null) { Entity entity = engine.getFirstEntity(); stmt.setTableSource(new SQLIdentifierExpr(entity.getName())); } }