我试图在Neo4j中将Python字典存储为节点键值对,但是,似乎不能将整数作为属性键。
CREATE (n:label {1: "first_val"})您也不能将整数作为字符串传递,这将是一个解决办法:
CREATE (n:label {"1": "first_val"})是否存在将整数存储为属性键的方法?
发布于 2018-05-22 16:47:30
节点标签、关系类型、属性名称的命名规则和建议文档声明(链接这里):
- This includes "non-English" characters, such as å, ä, ö, ü etc.
- If a leading non-alphabetic character is required, use backticks for escaping; e.g. `^n`.
- To illustrate, `1first` is not allowed, whereas `first1` is allowed.
- If a leading numeric character is required, use backticks for escaping; e.g. `1first`.
也就是说:您应该使用backticks来转义:
CREATE (n:label {`1`: "first_val"})https://stackoverflow.com/questions/50472689
复制相似问题