jamesfer / cypher-query-builder

An flexible and intuitive query builder for Neo4j and Cypher.
http://jamesfer.me/cypher-query-builder/index.html
MIT License
104 stars 22 forks source link

Fix handling of nested dictionaries #166

Closed jamesfer closed 3 years ago

jamesfer commented 3 years ago

The documentation described the behaviour of with and return when given a nested set of dictionaries:

query.with({
  people: {
    name: 'personName',
    age: 'personAge',
  },
});
// WITH people.name AS personName, people.age AS personAge

However the types forbade this. If using Javascript, no error was returned, however the result was very different to the documentation. It now behaves as documentated.

If you are using Typescript this is not a breaking change as the types would have prevented you from using the faulty behaviour.

If you as using Javascript then there is a chance that this will change the behaviour of your code but it is unlikely and the other behaviour is a bug.

fixes #137

jamesfer commented 3 years ago

:tada: This PR is included in version 6.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: