Skip to content

[Question] - SET clause using map syntax #40

@danjhd

Description

@danjhd

Can someone confirm whether it is possible to use cymple to add a SET clause that uses the map syntax? So that you can SET all the properties at once? The OpenCypher documentation for what i want is here

for example, instead of doing:

MATCH (n)
SET "n.foo" = "bar"
...

Which is done (i believe) with ...match().node(ref_name="n").set({"n.foo": "bar"})

I would like to generate the query:

MATCH (n)
SET n = {foo: "bar"}
...

I have tried this syntax ...match().node(ref_name="n").set({"n" : {"foo": "bar"}})

but this generates:

MATCH (n)
SET n = {'foo': 'bar'}
...

Which is throwing errors due to containing the single quotes around the key name in the map.

Really appreciate any help anyone can offer.

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