Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation mixes up set() and set_props() #328

Open
aekobear opened this issue Apr 11, 2019 · 0 comments
Open

documentation mixes up set() and set_props() #328

aekobear opened this issue Apr 11, 2019 · 0 comments

Comments

@aekobear
Copy link

The documentation for Query.set_props() says:

Works the same as the #set method, but when given a nested array it will set properties rather than setting entire objects

Examples:

# Creates a query representing the cypher: MATCH (n:Person) SET n.age = 19
Query.new.match(n: :Person).set_props(n: {age: 19})

However, the exact opposite is true:

Query.new.match(n: :Person).set_props(n: {age: 19}).to_cypher
# => "MATCH (n: `Person`) SET n = {n_set_props}"

Query.new.match(n: :Person).set(n: {age: 19}).to_cypher
# => "MATCH (n: `Person`) SET n.`age` = {setter_n_age}"

Runtime information:

Neo4j database version: 3.5.1
neo4j gem version: N/A
neo4j-core gem version: 9.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant