Class Schema
-
- All Implemented Interfaces:
-
io.github.cfraser.graphguard.plugin.Validator.Rule
public final class Schema implements Validator.Rule
A Schema describes the nodes and relationships in a Neo4j database via the (potentially) interconnected graphs.
Schema implements Validator.Rule, thus has the capability to validate that a Cypher query adheres to the nodes and relationships defined in the graphs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSchema.GraphA Graph is a Set of nodes that specify the expected entities in a Neo4j database.
public final classSchema.NodeA Node in the graph.
public final classSchema.RelationshipA Relationship in the graph.
public final classSchema.PropertyA Property on a Node or Relationship.
public final classSchema.Metadata
-
Field Summary
Fields Modifier and Type Field Description public final Map<String, Schema.Node>nodespublic final Map<Schema.Relationship.Id, Schema.Relationship>relationshipspublic final Set<Schema.Graph>graphs
-
Method Summary
Modifier and Type Method Description Validator.Rule.Violationvalidate(String cypher, Map<String, Object> parameters)Validate the cypher and parameters. -
-
Method Detail
-
validate
Validator.Rule.Violation validate(String cypher, Map<String, Object> parameters)
Validate the cypher and parameters.
- Parameters:
cypher- a Cypher queryparameters- the cypher parameters- Returns:
Violation if the cypher and parameters violate the Rule, otherwise
null
-
-
-
-