apoc.refactor

Qualified Name Type

apoc.refactor.categorize(sourceKey STRING, type STRING, outgoing BOOLEAN, label STRING, targetKey STRING, copiedKeys LIST<STRING>, batchSize INTEGER) - creates new category NODE values from NODE values in the graph with the specified sourceKey as one of its property keys. The new category NODE values are then connected to the original NODE values with a RELATIONSHIP of the given type.

Procedure

apoc.refactor.cloneNodes(nodes LIST<NODE>, withRelationships BOOLEAN, skipProperties LIST<STRING>) - clones the given NODE values with their labels and properties. It is possible to skip any NODE properties using skipProperties (note: this only skips properties on NODE values and not their RELATIONSHIP values).

Procedure

apoc.refactor.cloneSubgraph(nodes LIST<NODE>, rels LIST<RELATIONSHIP>, config MAP<STRING, ANY>) - clones the given NODE values with their labels and properties (optionally skipping any properties in the skipProperties LIST<STRING> via the config MAP), and clones the given RELATIONSHIP values. If no RELATIONSHIP values are provided, all existing RELATIONSHIP values between the given NODE values will be cloned.

Procedure

apoc.refactor.cloneSubgraphFromPaths(paths LIST<PATH>, config MAP<STRING, ANY>) - clones a sub-graph defined by the given LIST<PATH> values. It is possible to skip any NODE properties using the skipProperties LIST<STRING> via the config MAP.

Procedure

apoc.refactor.collapseNode(nodes ANY, relType STRING) - collapses the given NODE and replaces it with a RELATIONSHIP of the given type.

Procedure

apoc.refactor.deleteAndReconnect(path PATH, nodes LIST<NODE>, config MAP<STRING, ANY>) - removes the given NODE values from the PATH and reconnects the remaining NODE values.

Procedure

apoc.refactor.extractNode(rels ANY, labels LIST<STRING>, outType STRING, inType STRING) - expands the given RELATIONSHIP VALUES into intermediate NODE VALUES. The intermediate NODE values are connected by the given outType and inType.

Procedure

apoc.refactor.from(rel RELATIONSHIP, newNode NODE) - redirects the given RELATIONSHIP to the given start NODE.

Procedure

apoc.refactor.invert(rel RELATIONSHIP) - inverts the direction of the given RELATIONSHIP.

Procedure

apoc.refactor.mergeNodes(nodes LIST<NODE>, config MAP<STRING, ANY>) - merges the given LIST<NODE> onto the first NODE in the LIST<NODE>. All RELATIONSHIP values are merged onto that NODE as well.

Procedure

apoc.refactor.mergeRelationships(rels LIST<RELATIONSHIP>, config MAP<STRING, ANY>) - merges the given LIST<RELATIONSHIP> onto the first RELATIONSHIP in the LIST<RELATIONSHIP>.

Procedure

apoc.refactor.normalizeAsBoolean(entity ANY, propertyKey STRING, trueValues LIST<ANY>, falseValues LIST<ANY>) - refactors the given property to a BOOLEAN.

Procedure

apoc.refactor.rename.label(oldLabel STRING, newLabel STRING, nodes LIST<NODE>) - renames the given label from oldLabel to newLabel for all NODE values. If a LIST<NODE> is provided, the renaming is applied to the NODE values within this LIST<NODE> only.

Procedure

apoc.refactor.rename.nodeProperty(oldName STRING, newName STRING, nodes LIST<NODE>, config MAP<STRING, ANY>) - renames the given property from oldName to newName for all NODE values. If a LIST<NODE> is provided, the renaming is applied to the NODE values within this LIST<NODE> only.

Procedure

apoc.refactor.rename.type(oldType STRING, newType STRING, rels LIST<RELATIONSHIP>, config MAP<STRING, ANY>) - renames all RELATIONSHIP values with type oldType to newType. If a LIST<RELATIONSHIP> is provided, the renaming is applied to the RELATIONSHIP values within this LIST<RELATIONSHIP> only.

Procedure

apoc.refactor.rename.typeProperty(oldName STRING, newName STRING, rels LIST<RELATIONSHIP>, config MAP<STRING, ANY>) - renames the given property from oldName to newName for all RELATIONSHIP values. If a LIST<RELATIONSHIP> is provided, the renaming is applied to the RELATIONSHIP values within this LIST<RELATIONSHIP> only.

Procedure

apoc.refactor.setType(rel RELATIONSHIP, newType STRING) - changes the type of the given RELATIONSHIP.

Procedure

apoc.refactor.to(rel RELATIONSHIP, endNode NODE) - redirects the given RELATIONSHIP to the given end NODE.

Procedure