Account nodes are connected
fraud-ring-conformance::account-no-orphansView details
Expected: {"orphans": 0}
Measured: {"population": 2500, "violation_count": 0, "violations": 0}
Compiled Cypher
CALL {
CALL db.labels() YIELD label
RETURN collect(label) AS _gc_labels
}
CALL {
CALL db.relationshipTypes() YIELD relationshipType
RETURN collect(relationshipType) AS _gc_rel_types
}
CALL {
MATCH (n:`Account`)
OPTIONAL MATCH (n)-[r]-(other)
WITH n, count(r) AS degree
RETURN count(n) AS population,
sum(CASE WHEN degree = 0 THEN 1 ELSE 0 END) AS violation_count
}
RETURN
all(name IN $required_labels WHERE name IN _gc_labels)
AND all(name IN $required_relationship_types WHERE name IN _gc_rel_types) AS schema_ok,
[name IN $required_labels WHERE NOT name IN _gc_labels] AS missing_labels,
[name IN $required_relationship_types WHERE NOT name IN _gc_rel_types]
AS missing_relationship_types
,
population, violation_count, [] AS evidence