Open wqxs opened 2 years ago
Hi, SET a.map = '{"name":"b"}'
is setting the value of a.map to a string, not a map. remove the surrounding '
s SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ MATCH (a:a) WHERE a.id = 1 SET a.map = {"name":"b"} RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
嗨,正在将a.map的值设置为字符串,而不是map。去除周围的
SET a.map = '{"name":"b"}' ``'``SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ MATCH (a:a) WHERE a.id = 1 SET a.map = {"name":"b"} RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
I want to change the values in the map, but I can't
Ahh, sorry for the oversight. Property names don't need to be wrapped with "
.
SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ MATCH (a:a) WHERE a.id = 1 SET a.map = {name:"b"} RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
啊,抱歉疏忽了。属性名称不需要用 包装。
"
SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ MATCH (a:a) WHERE a.id = 1 SET a.map = {name:"b"} RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
It still doesn't work.
What version of AGE are you using? I am testing on Master.
What version of AGE are you using? I am testing on Master.
How to query the version
The bug fix is not in an official release, its only in master https://github.com/apache/age/commit/ab70781b4b311922f14f2bcb1b2144f1df9a9da1 how did you get AGE, through a release, docker, or did you download the source code?
The bug fix is not in an official release, its only in master ab70781 how did you get AGE, through a release, docker, or did you download the source code?
I used Docker to download it around the end of April,how do I replace this plugin if I want to use the latest version
Try to pull the docker image again docker pull apache/age
for this bug fix you should be able to restart the session and the bug will be fixed. However, if you can lose the data in the database, I recommend dropping the extension and recreating it.
Without upgrading, there is a workaround that was found. https://github.com/apache/age/issues/44 Basically if you wrap the map in an array, the first element in the array will be what the property is set to.
Try to pull the docker image again
docker pull apache/age
for this bug fix you should be able to restart the session and the bug will be fixed. However, if you can lose the data in the database, I recommend dropping the extension and recreating it.
After using the latest version, the error is fixed, but the Docker mapping directory cannot be used on the latest version of Docker
Try to pull the docker image again
docker pull apache/age
for this bug fix you should be able to restart the session and the bug will be fixed. However, if you can lose the data in the database, I recommend dropping the extension and recreating it.After using the latest version, the error is fixed, but the Docker mapping directory cannot be used on the latest version of Docker
Can an upgrade version be made without affecting the data?
Try to pull the docker image again
docker pull apache/age
for this bug fix you should be able to restart the session and the bug will be fixed. However, if you can lose the data in the database, I recommend dropping the extension and recreating it.After using the latest version, the error is fixed, but the Docker mapping directory cannot be used on the latest version of Docker
Can you describe what mapping directory this is or share the exact error you are seeing?
I created a point
SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ CREATE (a:a {id:1,map:{name:'a'}}) RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
results are as follows
I modify the map property value
SELECT * FROM ag_catalog.cypher('zjdata_graph', $$ MATCH (a:a) WHERE a.id = 1 SET a.map = '{"name":"b"}' RETURN id(a), properties(a) $$) as (id ag_catalog.agtype,properties ag_catalog.agtype)
This is not the result I want, please tell me how to solve it