final public WhereClause WhereClause() throws ParseException, ParseException { Token startToken = null; Expression whereExpr; jj_consume_token(WHERE); startToken = token; whereExpr = Expression(); WhereClause wc = new WhereClause(whereExpr); {if (true) return addSourceLocation(wc, startToken);} throw new Error("Missing return statement in function"); }
final public Clause WhereClause() throws ParseException, ParseException { WhereClause wc = new WhereClause(); Expression whereExpr; jj_consume_token(WHERE); whereExpr = Expression(); wc.setWhereExpr(whereExpr); {if (true) return wc;} throw new Error("Missing return statement in function"); }
final public Clause WhereClause() throws ParseException, ParseException { WhereClause wc = new WhereClause(); Expression whereExpr; jj_consume_token(WHERE); whereExpr = Expression(); wc.setWhereExpr(whereExpr); {if (true) return wc;} throw new Error("Missing return statement in function"); }
newWhereExpr.addOperator(OperatorType.AND); results.add(new WhereClause(newWhereExpr)); } else { results.add(firstWhereClause);
@Override public WhereClause visit(WhereClause whereClause, Void arg) throws CompilationException { WhereClause copy = new WhereClause((Expression) whereClause.getWhereExpr().accept(this, arg)); copy.setSourceLocation(whereClause.getSourceLocation()); return copy; }
@Override public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(WhereClause wc, VariableSubstitutionEnvironment env) throws CompilationException { Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = wc.getWhereExpr().accept(this, env); WhereClause newW = new WhereClause((Expression) p1.first); newW.setSourceLocation(wc.getSourceLocation()); return new Pair<>(newW, p1.second); }
@Override public Void visit(DeleteStatement deleteStmt, Void visitArg) { List<Expression> arguments = new ArrayList<>(); Identifier dataverseName = deleteStmt.getDataverseName(); Identifier datasetName = deleteStmt.getDatasetName(); String arg = dataverseName == null ? datasetName.getValue() : dataverseName.getValue() + "." + datasetName.getValue(); LiteralExpr argumentLiteral = new LiteralExpr(new StringLiteral(arg)); arguments.add(argumentLiteral); CallExpr callExpression = new CallExpr(new FunctionSignature(BuiltinFunctions.DATASET), arguments); List<Clause> clauseList = new ArrayList<>(); VariableExpr var = deleteStmt.getVariableExpr(); Clause forClause = new ForClause(var, callExpression); clauseList.add(forClause); Clause whereClause = null; Expression condition = deleteStmt.getCondition(); if (condition != null) { whereClause = new WhereClause(condition); clauseList.add(whereClause); } VariableExpr returnExpr = new VariableExpr(var.getVar()); returnExpr.setIsNewVar(false); FLWOGRExpression flowgr = new FLWOGRExpression(clauseList, returnExpr); Query query = new Query(false); query.setBody(flowgr); deleteStmt.setQuery(query); return null; }
jj_consume_token(WHERE); beginPos = token; whereClause = new WhereClause(); Expression whereExpr; whereExpr = Expression();
whereClause = new WhereClause(whereClauseQuery.getBody());
Expression condition = deleteStmt.getCondition(); if (condition != null) { whereClause = new WhereClause(condition); whereClause.setSourceLocation(condition.getSourceLocation());