Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-09-2019 10:24 AM
Is there no way to return every property except one?
For eg. the following will return all properties:
MATCH (n:Node)
RETURN n
Now, what I want/suggest to provide feature something like below if there's no way to achieve as far as current system:
MATCH (n:Node)
RETURN n {.*, !except:specific} // exclamation, otherwise it seems to be included property
06-09-2019 05:05 PM
This is something we'd love to include later, but in the meantime you can use some map functions from APOC Procedures for a workaround:
MATCH (n:Node)
RETURN apoc.map.removeKey(n {.*}, 'specific') as propsWithoutKey
06-09-2019 09:27 PM
Sadly, I am not using APOC.
06-09-2019 09:37 PM
In that case I don't believe there are any workarounds here for the time being, unless you want to write the equivalent as your own stored procedure and deploy it.
06-10-2019 01:15 AM
This is very close to what you need, except it returns an array and not a map:
MATCH (n:Node)
RETURN [x in keys(n) WHERE not x in ["bad1"]| [x, n[x] ] ]
Cypher doesn't have a way to create maps with dynamic keys, so either APOC or array as workarounds.
06-20-2019 01:08 AM
This is something we'd love to include later...
Please reply here whenever Cypher itself will include the feature. I'll be waiting for long to get this feature...
06-20-2019 10:01 AM
We have the request in our backlog, but keep in mind this is subject to prioritization, and there is a lot on our plates for 4.0. We can't offer any guarantees on when this may make it into the product.
06-20-2019 10:54 AM
I hope it will be done at least in 1 year.
01-27-2023 10:05 AM
Just wondering if there was any update on this topic? Would love to see this feature
All the sessions of the conference are now available online