1
Fork 0
mirror of https://github.com/Steffo99/unimore-bda-5.git synced 2024-11-21 23:54:24 +00:00
bda-5-steffo/scripts/1-graph-projection-cypher.cypher

11 lines
409 B
Text

CALL gds.graph.project.cypher(
"deps",
"MATCH (a:Crate) RETURN id(a) AS id",
"MATCH (a:Crate)-[:HAS_VERSION]->(v:Version) WITH a, v ORDER BY v.name DESC WITH a, collect(v.name)[0] AS vn MATCH (a:Crate)-[:HAS_VERSION]->(v:Version {name: vn})-[:DEPENDS_ON]->(c:Crate) RETURN id(a) AS source, id(c) AS target"
) YIELD
graphName,
nodeQuery,
nodeCount,
relationshipQuery,
relationshipCount,
projectMillis