Skip to content

Load entities by query #1

@wcooley

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

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