org.neo4j.cypher.export.DatabaseSubGraph Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apoc-common Show documentation
Show all versions of apoc-common Show documentation
Data types package for Neo4j Procedures
package org.neo4j.cypher.export;
import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.schema.ConstraintDefinition;
import org.neo4j.graphdb.schema.IndexDefinition;
import java.util.Iterator;
import static apoc.export.cypher.formatter.CypherFormatterUtils.cypherNode;
import static apoc.util.Util.quote;
public class DatabaseSubGraph implements SubGraph
{
private final Transaction transaction;
public DatabaseSubGraph( Transaction transaction )
{
this.transaction = transaction;
}
@Override
public Iterable getNodes()
{
return transaction.getAllNodes();
}
@Override
public Iterable getRelationships()
{
return transaction.getAllRelationships();
}
@Override
public Iterable getIndexes()
{
return transaction.schema().getIndexes();
}
@Override
public Iterable getConstraints(Label label) {
return transaction.schema().getConstraints(label);
}
@Override
public Iterable getConstraints(RelationshipType type) {
return transaction.schema().getConstraints(type);
}
@Override
public Iterable getIndexes(Label label) {
return transaction.schema().getIndexes(label);
}
@Override
public Iterable getIndexes(RelationshipType type) {
return transaction.schema().getIndexes(type);
}
@Override
public Iterable getAllRelationshipTypesInUse() {
return transaction.getAllRelationshipTypesInUse();
}
@Override
public Iterable
© 2015 - 2024 Weber Informatics LLC | Privacy Policy