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

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

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

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class CypherOrderBy extends CypherAstBase {
    private final List sortItems;

    public CypherOrderBy(List sortItems) {
        this.sortItems = sortItems;
    }

    public List getSortItems() {
        return sortItems;
    }

    @Override
    public String toString() {
        return String.format(
            "ORDER BY %s",
            getSortItems().stream().map(CypherSortItem::toString).collect(Collectors.joining(", "))
        );
    }

    @Override
    public Stream getChildren() {
        return sortItems.stream();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy