O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Renaming

There is no renaming feature in Cypher but there is a procedure for that in APOC.

The sentence there is a procedure for that in APOC is almost a mantra in the Neo4j community.

The longer version ends with--if there isn't , ask Michael,  for Michael Hunger whom I already wrote about.

It is possible to rename labels, relations, node properties, and relation properties with APOC.

Currently, relations are named types so the procedures are as follows:

CALL apoc.refactor.rename.label(oldLabel, newLabel, [nodes])CALL apoc.refactor.rename.type(oldType, newType, [rels])CALL apoc.refactor.rename.nodeProperty(oldName, newName, [nodes])orCALL apoc.refactor.rename.typeProperty(oldName, newName, [rels])

You may optionally give a list of nodes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required