You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
I checked opencypher specification and tck tests. And I also googled. Very few about this behavior.
# a tck case about add property
Scenario: Overwrite values when using +=
Given an empty graph
And having executed:
"""
CREATE (:X {name: 'A', name2: 'B'})
"""
When executing query:
"""
MATCH (n:X {name: 'A'})
SET n += {name2: 'C'}
RETURN n
"""
Then the result should be, in any order:
| n |
| (:X {name: 'A', name2: 'C'}) |
And the side effects should be:
| +properties | 1 |
| -properties | 1 |
Scenario: `properties()` on a node
Given an empty graph
And having executed:
"""
CREATE (n:Person {name: 'Popeye', level: 9001})
"""
When executing query:
"""
MATCH (p:Person)
RETURN properties(p) AS m
"""
Then the result should be, in any order:
| m |
| {name: 'Popeye', level: 9001} |
And no side effects
name/level are not ordered in the alphabet, and {} is a map.
My suggestion is to clarify that: Properties have no guaranteed order in the doc.
Thanks for taking care of this. The opencypher do not specify such a behavior, and i think there would not be one of such a specification. As said by @whitewum , we implement the map by an unordered map, the order would not be guaranteed. As far as i know, this is not a big problem for using. So i'll close this issue first unless we really meet any using problems in real world.
In the schema, name comes first and age comes second, but the order in the returned result is wrong.
The text was updated successfully, but these errors were encountered: