Skip to content

graph-refactoring/graph-refactoring-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client-Side Graph Refactorings for Neo4j, in Go

Go

This is inspired from the APOC refactorings, but implemented completely on the driver side, with the official Go driver for Neo4j.

This does not necessarily match 1:1 with APOC.

Run it at your own risk!

Merge Nodes

API

Import "github.com/graph-refactoring/graph-refactoring-go/pkg/refactoring" and either call:

  • MergeNodes(neo4j.Transaction, refactoring.Pattern, []refactoring.PropertyMergePolicy)
  • MergeNodesFn(refactoring.Pattern, policies []refactoring.PropertyMergePolicy) neo4j.TransactionWork

The first is better suited for explicit driver transactions. The other is available as a transaction function.

Example

Adapt cmd/merge-nodes-example/main.go connection settings and run:

go run ./cmd/merge-nodes-example

This assumes the movie graph has been imported.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages