private UnsupportedDatastoreFeatureException newUnsupportedQueryMethodException( InvokeExpression invocation) { throw new UnsupportedDatastoreFeatureException( "Unsupported method <" + invocation.getOperation() + "> while parsing expression: " + invocation); }
private String getAliasIfMapExpression(InvokeExpression expr, Set<String> mappingAliases) { if ("mapValue".equals(expr.getOperation()) || "mapKey".equals(expr.getOperation()) || "mapEntry".equals(expr.getOperation())) { String alias = expr.getLeft().getSymbol().getQualifiedName(); mappingAliases.add(alias); return alias; } else { return getAlias(expr.getLeft(), mappingAliases); } } }
private String getAliasIfMapExpression(InvokeExpression expr, Set<String> mappingAliases) { if ("mapValue".equals(expr.getOperation()) || "mapKey".equals(expr.getOperation()) || "mapEntry".equals(expr.getOperation())) { String alias = expr.getLeft().getSymbol().getQualifiedName(); mappingAliases.add(alias); return alias; } else { return getAlias(expr.getLeft(), mappingAliases); } } }
private boolean isAggregate(Expression expr) { if (expr == null) return false; if (expr instanceof InvokeExpression) { String methodName = ((InvokeExpression) expr).getOperation(); return AGGREGATE_METHODS.contains(methodName); } else { return isAggregate(expr.getRight()) || isAggregate(expr.getLeft()); } }
private boolean isAggregate(Expression expr) { if (expr == null) return false; if (expr instanceof InvokeExpression) { String methodName = ((InvokeExpression) expr).getOperation(); return AGGREGATE_METHODS.contains(methodName); } else { return isAggregate(expr.getRight()) || isAggregate(expr.getLeft()); } }
if (invokeExpr.getOperation().equalsIgnoreCase("MAX") || invokeExpr.getOperation().equalsIgnoreCase("MIN") || invokeExpr.getOperation().equalsIgnoreCase("SUM") || invokeExpr.getOperation().equalsIgnoreCase("AVG") || invokeExpr.getOperation().equalsIgnoreCase("COUNT")) invokeExpr.getOperation() +" with arg of type " + argExpr.getClass().getName() + " not supported in-datastore"); Neo4jExpression aggExpr = new Neo4jAggregateExpression(invokeExpr.getOperation(), aggrArgExpr); str.append(aggExpr.getCypherText()); NucleusLogger.QUERY.warn("Invocation of static method " + invokeExpr.getOperation() +" not supported in-datastore"); resultComplete = false; break;
if ("count".equalsIgnoreCase(((InvokeExpression) expr).getOperation()) && resultExprs.length == 1)
private boolean appendInvokeExpression(ExpressionBuilderHelper h, InvokeExpression invocation, ExecutionContext executionContext, boolean not) { boolean done = false; String oper = invocation.getOperation(); if ("matches".equals(oper)) { if (not) h.sb.append("NOT ");
private boolean appendInvokeExpression(ExpressionBuilderHelper h, InvokeExpression invocation, ExecutionContext executionContext, boolean not) { boolean done = false; String oper = invocation.getOperation(); if ("matches".equals(oper)) { if (not) h.sb.append("NOT ");
String oper = ev.getOperation(); if ("mapKey".equals(oper) || "mapValue".equals(oper) || "mapEntry".equals(oper)) { String alias = expr.getLeft().getSymbol().getQualifiedName();
String oper = ev.getOperation(); if ("mapKey".equals(oper) || "mapValue".equals(oper) || "mapEntry".equals(oper)) { String alias = expr.getLeft().getSymbol().getQualifiedName();
protected Object processInvokeExpression(InvokeExpression expr) String method = expr.getOperation(); SubstringFilter filter; if (invokedExpr instanceof PrimaryExpression)
SQLExpression sqlExpr = (SQLExpression)evaluate(argExpr); if (argExpr instanceof InvokeExpression && ((InvokeExpression)argExpr).getOperation().equalsIgnoreCase("SQL_function"))
results.addAll(readNonEntityObjects(qr.getRecords(), resultExpr, query.getResultClass())); } else if (resultExpr.length == 1 && resultExpr[0] instanceof InvokeExpression && "COUNT".equals(((InvokeExpression) resultExpr[0]).getOperation())) {
results.addAll(readNonEntityObjects(qr.getRecords(), resultExpr, query.getResultClass())); } else if (resultExpr.length == 1 && resultExpr[0] instanceof InvokeExpression && "COUNT".equals(((InvokeExpression) resultExpr[0]).getOperation())) {
if (resultExpr instanceof InvokeExpression) { InvokeExpression invokeExpr = (InvokeExpression) resultExpr; if (invokeExpr.getOperation().toLowerCase().equals("count")) {
String method = invokeExpr.getOperation(); if (invokedExpr instanceof PrimaryExpression)
if (invokeExpr.getOperation().equals("contains") && invokeExpr.getArguments().size() == 1) { handleContainsOperation(invokeExpr, qd); }else if (invokeExpr.getOperation().equals("startsWith") && invokeExpr.getArguments().size() == 1) { handleStartsWithOperation(invokeExpr, qd); } else if (invokeExpr.getOperation().equals("matches")) { handleMatchesOperation(invokeExpr, qd); } else {
String method = expr.getOperation(); if (invokedExpr instanceof PrimaryExpression)
if (invokeExpr.getOperation().equals("size")) throw new NucleusException("Attempt to invoke method " + invokeExpr.getOperation() + " on field " + field + " but not currently supported by NeoDatis JDOQL"); throw new NucleusException("Attempt to invoke " + invokeExpr.getOperation() + " on " + invokedExpr + " but this is not currently supported by NeoDatis JDOQL");