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

apoc.get.Get Maven / Gradle / Ivy

There is a newer version: 5.25.1
Show newest version
package apoc.get;

import apoc.result.NodeResult;
import apoc.result.RelationshipResult;
import apoc.util.Util;
import org.neo4j.graphdb.Transaction;
import org.neo4j.procedure.Name;

import java.util.stream.Stream;

public class Get {

    public Transaction tx;

    public Get(Transaction tx) {
        this.tx = tx;
    }

    public Stream nodes(@Name("nodes") Object ids) {
        return Util.nodeStream(tx, ids).map(NodeResult::new);
    }

    public Stream rels(@Name("rels") Object ids) {
        return Util.relsStream(tx, ids).map(RelationshipResult::new);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy