Skip to content

Load entities by query #1

Description

@wcooley

Recently I used this to create a new static structure in my database -- several new nodes with their relationships linking them. But when it came time to create relationships to nodes that already existed in my database, I had to resort to doing so manually.

I'd like to be able to specify a Cypher query for nodes as a YAML type, the anchor of which can then be used as an alias in defining relationships.

e.g.:

- &node-darth-vader !!python/object/apply:gryaml.node
  - labels:
    - person

- &node-luke-skywalker !!python/object/apply:gryaml.node_query
  - cypher: MATCH (p:person{name:"Luke Skywalker"}) RETURN p

- !!python/object/apply:gryaml.rel
 - *node-darth_vader
 - father_of
 - *node-luke-skywalker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions