All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.cypher.functions.predicate.ExistsFunction Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.cypher.functions.predicate;

import org.vertexium.cypher.VertexiumCypherQueryContext;
import org.vertexium.cypher.ast.model.CypherAstBase;
import org.vertexium.cypher.executor.ExpressionScope;
import org.vertexium.cypher.functions.CypherFunction;

public class ExistsFunction extends CypherFunction {
    @Override
    public Object invoke(VertexiumCypherQueryContext ctx, CypherAstBase[] arguments, ExpressionScope scope) {
        CypherAstBase lookup = arguments[0];
        Object value = ctx.getExpressionExecutor().executeExpression(ctx, lookup, scope);
        return value != null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy