apache / age

Graph database optimized for fast analysis and real-time data processing. It is provided as an extension to PostgreSQL.
https://age.apache.org
Apache License 2.0
3.02k stars 406 forks source link

Can not remove the label on a node #361

Open lloydsun opened 1 year ago

lloydsun commented 1 year ago

Describe the bug I have a label "Game" on a node, I wanna change it to "game", but I tried REMOVE, I got an error:

syntax error at or near ":"

How are you accessing AGE (Command line, driver, etc.)? nodejs driver

I am using the official docker :latest

What data setup do we need to do?

...
SELECT
    *
FROM
    cypher('vg-graph', $$
        CREATE (g:Game {name: "Front Mission", uid: "Pt6DmC8jnzDy", body: "some text"})
    $$) as (n agtype);
...

What is the necessary configuration info needed?

What is the command that caused the error?

SET search_path TO ag_catalog;

SELECT
    *
FROM
    cypher('vg-graph', $$
        MATCH (n {uid:"Pt6DmC8jnzDy"})
        REMOVE n:Game
        RETURN n
    $$) as (n agtype);
ERROR:  syntax error at or near ":"

Expected behavior Remove the label

Environment (please complete the following information):

Additional context no.

jrgemignani commented 1 year ago

Currently, the REMOVE command cannot remove labels. Unlike Neo4j, AGE only supports 1 label name for any vertex or edge. So, removing a label would mean removing the vertex or edge.

Note to team: This may be something where we should consider removing a label name and setting it to the default label.

lloydsun commented 1 year ago

Oh, I see. Thank you for the explanation! Keep up the GREAT work :)

rsoury commented 2 months ago

@jrgemignani - There's a lot of dormant issues that cause concern for new adopters (like me). Highly advise pruning or including a bot to do so.

jrgemignani commented 2 months ago

@rsoury We already have a bot (relatively new) doing just that, but we have to be fair to issue creators by giving them a reasonable amount of time to respond or close the ticket themselves. It is preferable that the issue creator closes their issue.