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

org.vertexium.cypher.ast.model.CypherUnwindClause Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.cypher.ast.model;

import java.util.stream.Stream;

public class CypherUnwindClause extends CypherClause {
    private final String name;
    private final CypherAstBase expression;

    public CypherUnwindClause(String name, CypherAstBase expression) {
        this.name = name;
        this.expression = expression;
    }

    public CypherAstBase getExpression() {
        return expression;
    }

    public String getName() {
        return name;
    }

    @Override
    public Stream getChildren() {
        return Stream.of(expression);
    }

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        result.append("UNWIND ").append(getExpression());
        if (getName() != null) {
            result.append(" AS ").append(getName());
        }
        return result.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy