Skip to content

Make documentation for get_or_create vs create_or_update clearer #879

@gussmith23

Description

@gussmith23

Hi! Thanks for the wonderful project.

I'm a little confused on the above two functions, and the documentation isn't helping much. I've stared at the code, and here's my best guess:

get_or_create: This feels more straightforward: if the node exists with the exact params, then return it, otherwise create a new node.

create_or_update: This function seems more complicated. Something like, if the node exists in some form, find it and potentially update its fields. If it doesn't exist at all, create it. The thing I'm confused by is, what's considered a match? Ie when will a node match and be updated, vs when will an entirely new node be created? From looking at the code (and now that I see it, the documentation) it seems to be only required fields that are matched on?

An example would probably be the most useful thing!

Thanks again all!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions