Skip to content

Using Nodes to update existing records #81

Open
@boris-42

Description

@boris-42

Currently, this framework supports only creation of new nodes, but if we want to update some properties, manual requests are required.

As far as I understand, there are 2 approaches here, one through MERGE (to ensure that record exists and update) or MATCH (to update record only if it exists) and it's recommend to use external ids.

The proposal is to add to methods to graph:
def update(node: Node) -> MATCH+ SET
and

def ensure(node: Node) -> MERGE + SET

To do match or merge we need to have ID, which in real life is usually is some UUID from some external system. To solve this we can extend Node.__init__ to allow to pass "id_key" or "id" which will be the name of the property that is use as external id

Is community interested in this kind of change?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions