org.vertexium.cypher.functions.scalar.CoalesceFunction Maven / Gradle / Ivy
package org.vertexium.cypher.functions.scalar;
import org.vertexium.cypher.VertexiumCypherQueryContext;
import org.vertexium.cypher.functions.SimpleCypherFunction;
public class CoalesceFunction extends SimpleCypherFunction {
@Override
protected Object executeFunction(VertexiumCypherQueryContext ctx, Object[] arguments) {
for (Object argument : arguments) {
if (argument != null) {
return argument;
}
}
return null;
}
}