neo4jrb / neo4j-core

A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
MIT License
99 stars 80 forks source link

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

Open aekobear opened 5 years ago

aekobear commented 5 years ago

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