Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for map arrays #9

Open
bbenzikry opened this issue Oct 13, 2020 · 0 comments
Open

Add support for map arrays #9

bbenzikry opened this issue Oct 13, 2020 · 0 comments

Comments

@bbenzikry
Copy link
Owner

bbenzikry commented Oct 13, 2020

See bbenzikry/neo4clj#1

The following does not work

match(e:testing)
with collect(e.date) as dates,  ["column1", "column2"] as columns
unwind dates as dt
with [{_date:dt,  _name:columns[0], avg:tointeger(rand() * 100)},{_date:dt,  _name:columns[1], avg:tointeger(rand() * 100)} ] as test_metrics
return test_metrics

while this will:

match(e:testing)
with collect(e.date) as dates,  ["column1", "column2"] as columns
unwind dates as dt
with [{_date:dt,  _name:columns[0], avg:tointeger(rand() * 100)},{_date:dt,  _name:columns[1], avg:tointeger(rand() * 100)} ] as test_metrics
unwind test_metrics as tm 
return tm._date, tm._name, tm.avg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant