Cypher::List all property keys allowed?

66 views
Skip to first unread message

Antonio Castellon

unread,
Jan 8, 2015, 9:48:31 AM1/8/15
to ne...@googlegroups.com
Dear Developers,

I'm trying to execute a cypher query that allows to me to give the different property-keys froma group of Nodes. 
Something similar to the labels(x) function.

Something like:


  MATCH
(n) UNWIND properties(n) RETURN distinct(theKeys)


I try to search on internet a solution, but looks like that is not implemented in Cypher Engine...and dosen't look that other sentence can be used. 
Therefore, my question is if anybody knows if exists any date to add this feature into the Cypher's core ? it's really useful if you want to create a flexible application independent from the structure of the nodes.

I don't want to implement an special feature using directly REST or creating an special Neo4j service :-( ...and to give the all data from a simple query, then create a json object in memory (with the pair maps) and finally parse it to give the attributes... it's not a good solution.

Thnaks in advance for your response,
Have a nice day,

Antonio

David Osumi-Sutherland

unread,
May 3, 2017, 7:45:05 AM5/3/17
to Neo4j
This seems to work:

   MATCH (n) with keys(n) AS kl UNWIND kl as k RETURN DISTINCT k;

Michael Hunger

unread,
May 3, 2017, 10:04:29 AM5/3/17
to ne...@googlegroups.com
call db.propertyKeys();

On Sun, Apr 30, 2017 at 11:36 AM, David Osumi-Sutherland <dos...@gmail.com> wrote:
This seems to work:

   MATCH (n) with keys(n) AS kl UNWIND kl as k RETURN DISTINCT k;

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages