@Override public Pair<Table, List<JoinSpec>> visit(JoinTableNode joinNode) throws SQLException { Pair<Table, List<JoinSpec>> lhs = joinNode.getLHS().accept(this); Pair<Table, List<JoinSpec>> rhs = joinNode.getRHS().accept(this); JoinTable joinTable = rhs.getSecond() == null ? new JoinTable(rhs.getFirst()) : new JoinTable(rhs.getFirst(), rhs.getSecond()); List<JoinSpec> joinSpecs = lhs.getSecond(); if (joinSpecs == null) { joinSpecs = new ArrayList<JoinSpec>(); } joinSpecs.add(new JoinSpec(joinNode.getType(), joinNode.getOnNode(), joinTable, joinNode.isSingleValueOnly(), origResolver)); return new Pair<Table, List<JoinSpec>>(lhs.getFirst(), joinSpecs); }
JoinTableConstructor constructor = compiler.new JoinTableConstructor(); Pair<Table, List<JoinSpec>> res = select.getFrom().accept(constructor); JoinTable joinTable = res.getSecond() == null ? compiler.new JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), res.getSecond()); if (select.getWhere() != null) { joinTable.addFilter(select.getWhere());
JoinTableConstructor constructor = compiler.new JoinTableConstructor(); Pair<Table, List<JoinSpec>> res = select.getFrom().accept(constructor); JoinTable joinTable = res.getSecond() == null ? compiler.new JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), res.getSecond()); if (select.getWhere() != null) { joinTable.addFilter(select.getWhere());
JoinTableConstructor constructor = compiler.new JoinTableConstructor(); Pair<Table, List<JoinSpec>> res = select.getFrom().accept(constructor); JoinTable joinTable = res.getSecond() == null ? compiler.new JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), res.getSecond()); if (select.getWhere() != null) { joinTable.addFilter(select.getWhere());
@Override public Pair<Table, List<JoinSpec>> visit(JoinTableNode joinNode) throws SQLException { Pair<Table, List<JoinSpec>> lhs = joinNode.getLHS().accept(this); Pair<Table, List<JoinSpec>> rhs = joinNode.getRHS().accept(this); JoinTable joinTable = rhs.getSecond() == null ? new JoinTable(rhs.getFirst()) : new JoinTable(rhs.getFirst(), rhs.getSecond()); List<JoinSpec> joinSpecs = lhs.getSecond(); if (joinSpecs == null) { joinSpecs = new ArrayList<JoinSpec>(); } joinSpecs.add(new JoinSpec(joinNode.getType(), joinNode.getOnNode(), joinTable, joinNode.isSingleValueOnly(), origResolver)); return new Pair<Table, List<JoinSpec>>(lhs.getFirst(), joinSpecs); }
@Override public Pair<Table, List<JoinSpec>> visit(JoinTableNode joinNode) throws SQLException { Pair<Table, List<JoinSpec>> lhs = joinNode.getLHS().accept(this); Pair<Table, List<JoinSpec>> rhs = joinNode.getRHS().accept(this); JoinTable joinTable = rhs.getSecond() == null ? new JoinTable(rhs.getFirst()) : new JoinTable(rhs.getFirst(), rhs.getSecond()); List<JoinSpec> joinSpecs = lhs.getSecond(); if (joinSpecs == null) { joinSpecs = new ArrayList<JoinSpec>(); } joinSpecs.add(new JoinSpec(joinNode.getType(), joinNode.getOnNode(), joinTable, joinNode.isSingleValueOnly(), origResolver)); return new Pair<Table, List<JoinSpec>>(lhs.getFirst(), joinSpecs); }