Property value to a label
The available procedure is described in the table below:
Qualified Name | Type | Release |
---|---|---|
- adds the given labels to the node or nodes |
|
|
Example Usage
The example below will help us learn how to use this procedure.
The following creates a
Movie
node with title
and genre
propertiesCREATE (:Movie {title: 'A Few Good Men', genre: 'Drama'})
The following moves the 'genre' property to a label and removes it as a property
MATCH (n:Movie)
CALL apoc.create.addLabels( id(n), [ n.genre ] )
YIELD node
REMOVE node.genre
RETURN node