public boolean visit(SQLIdentifierExpr x) { String currentTable = getCurrentTable(); if (subQueryMap.containsKey(currentTable)) { return false; } String ident = x.toString(); if (variants.containsKey(ident)) { return false; } Column column; if (currentTable != null) { column = addColumn(currentTable, ident); x.putAttribute(ATTR_COLUMN, column); } else { column = handleUnkownColumn(ident); if (column != null) { x.putAttribute(ATTR_COLUMN, column); } } if (column != null) { setColumn(x, column); } return false; }
public boolean visit(SQLPropertyExpr x) { if (x.getOwner() instanceof SQLIdentifierExpr) { String owner = ((SQLIdentifierExpr) x.getOwner()).getName(); if (subQueryMap.containsKey(owner)) { return false; } owner = aliasWrap(owner); if (owner != null) { Column column = addColumn(owner, x.getName()); x.putAttribute(ATTR_COLUMN, column); if (column != null) { if (column != null) { setColumn(x, column); } } } } return false; }