Filter on property keys

I have two use cases that I’d love some guidance on:

  1. Say I have nodes:

    (mynode { name: "node1", complex_property_name_foo: "true" })
    (mynode { name: "node2", complex_property_name_bar: "false" })
    (mynode { name: "node3", other_property: "yay" })
    

    How do I query for mynodes with properties that start with complex_property_name_?

  2. How do I query for all the properties of a specific node? I looked here: https://s3.amazonaws.com/artifacts.opencypher.org/openCypher9.pdf for inspiration, and so I tried:

    CALL db.propertyKeys() YIELD propertyKey
    MATCH (n:mynode { name: "node1" })
    WHERE n[propertyKey] IS NOT NULL
    RETURN propertyKey
    

    But that returns Type mismatch: expected List but was Node

Good question(s),
At the moment the closest thing that we have is the exists function, we should add a function that given a vertex or an edge will return all of the entity’s attribute names, similar to properties

if you can please open an issue on our repository

1 Like