skip to Main Content

I am using the following sample query to create a node with a label.

SELECT *
FROM cypher('vg-graph', $$
    CREATE (m:Movie {name: "Movie Name", uid: "12345678", body: "Description"})
    $$) as (n agtype);

Following query should remove label ‘Movie’ from the node.

SET search_path TO ag_catalog;
SELECT *
FROM cypher('vg-graph', $$
    MATCH (n {uid:"12345678"})
    REMOVE n:Movie
    RETURN n
    $$) as (n agtype);

but produces ERROR: syntax error at or near ":"

How can I achieve the same task in other ways?

2

Answers


  1. At present, you can not remove the label name from a node or edge because the ID of node/edge is given from sequence id initially assigned to the label hence coupling the entity existence to its label.

    Thus, such an invalid operation would result in an error.

    However, separating entity ID from label ID is in progress. This would allow updating/deleting existing labels and adding multiple labels to entities.

    Login or Signup to reply.
  2. Currently, it is not possible to remove the label name from a node or edge because the entity’s ID is associated with the label. Removing the label would invalidate the entity’s existence, resulting in an error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search