-
-
Save laurieboyes/7df68f0cf600411acdbfe2c9840b0a5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Many thanks for this code. I modified is as below, but I am not sure whether the indexing is more efficient on an integer or on a string. I assumed on an integer.