Skip to content

Commit

Permalink
document Neo4jDB
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe1st committed Nov 26, 2024
1 parent eebe9b1 commit 5b80a77
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
import org.neo4j.graphdb.schema.ConstraintDefinition;
import org.neo4j.graphdb.schema.ConstraintType;

/**
* Represents a Neo4J database as an {@link AttributedGraph}.
*
* All operations are executed using the {@link Transaction} passed to the constructor.
*
* The {@link Node#getElementId() element ID} from Neo4J is used as the identifier of nodes.
*
* This implementation supports {@link AttributedGraph#isAttributeUniqueForNodeType(String, String) unique attributes}.
* A node attribute is considered {@link AttributedGraph#isAttributeUniqueForNodeType(String, String) unique} with respect to a given node type if a unique constraint on that attribute exists for that node type.
* Information on unique attributes is cached. If unique constraints change after creating the {@link Neo4jDB} instance, these changes may not be observed.
*/
public class Neo4jDB implements AttributedGraph<Neo4jNode, Neo4jEdge> {
private final Transaction tx;
private final Map<String, Set<String>> uniqueAttributesPerNodeType = new HashMap<>();
Expand Down

0 comments on commit 5b80a77

Please sign in to comment.