Skip to content

Instantly share code, notes, and snippets.

@laurieboyes laurieboyes/time-tree-index.cql Secret
Created Sep 28, 2017

Embed
What would you like to do?
MATCH (root:TimeTreeRoot)-[:CHILD]->(year:Year)
WITH collect(year) AS years UNWIND years AS y
SET y.uuid = toString(y.value)
WITH y
MATCH (y)-[:CHILD]->(month:Month)
WITH y, collect(month) AS months UNWIND months AS m
SET m.uuid = m.value + '/' + y.value
WITH y, m
MATCH (m)-[:CHILD]->(day:Day)
WITH y, m, collect(day) AS days UNWIND days AS d
SET d.uuid = d.value + '/' + m.value + '/' + y.value
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.