Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
 public static void setDataSource(MappingEngine engine, SQLDeleteStatement stmt) {
   if (stmt.getExprTableSource() == null) {
     Entity entity = engine.getFirstEntity();
     stmt.setTableSource(new SQLIdentifierExpr(entity.getName()));
   }
 }