Neo4j Versioner Core is a collection of procedures, aimed to help developers to manage the Entity-State model, by creating, updating and querying the graph.
Apache License 2.0
- Download the latest release;
- Put the downloaded jar file into
$NEO4J_HOME/plugins
folder; - Start/Restart Neo4j.
Versioner version | Neo4j version |
---|---|
2.x.x | 3.5.x |
4.2.x | 4.2.x |
Neo4j Versioner Core has been developed by Alberto D'Este and Marco Falcier.
It's based on the following data model:
A little example on how you can add a State
node to a given Entity:
MATCH (d:Device) WITH d CALL graph.versioner.update(d, {context:'some details'}, 'Error', localdatetime('1988-10-27T02:46:40')) YIELD node RETURN node
And how to retrieve the current State
:
MATCH (d:Device) WITH d CALL graph.versioner.get.current.state(d) YIELD node RETURN node
If you want to use Neo4j Versioner Core procedures on your procedures/functions you simply create a new instance:
Optional<Init> result = new InitBuilder().withDb(db).withLog(log).build();
result.ifPresent(a -> a.init("EntityLabel", entityProps, stateProps, additionalLabel, date));
From version 2.0.0 you can also version relationships: to see how, see the full documentation here.
We would appreciate your feedback about our Versioner Core, how to improve and fix (we hope not so many! 🙈) any bad things. Say yours in the issue section.
This project is developed during our free time, and our free time is mostly during evening/night! So coffee is really helpful during our sessions 😅. If you want to help us with that, you can buy us some ☕ thanks to PayPal!