https://github.com/meistermeier/neo4j-ogm-label-extension
Example of a cypher modification provider for Neo4j-OGM
https://github.com/meistermeier/neo4j-ogm-label-extension
java neo4j neo4j-ogm
Last synced: 24 days ago
JSON representation
Example of a cypher modification provider for Neo4j-OGM
- Host: GitHub
- URL: https://github.com/meistermeier/neo4j-ogm-label-extension
- Owner: meistermeier
- License: apache-2.0
- Created: 2018-09-21T10:16:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T14:11:24.000Z (over 6 years ago)
- Last Synced: 2025-05-10T13:57:49.326Z (26 days ago)
- Topics: java, neo4j, neo4j-ogm
- Language: Java
- Homepage:
- Size: 44.9 KB
- Stars: 6
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
image:https://api.travis-ci.org/meistermeier/neo4j-ogm-label-extension.svg?branch=master[build state]
== Label Extension for Neo4j-OGM
This projects provides a limited support for manipulating Cypher statements
and adding an additional label to all nodes in the statement.=== Usage
Just add this library to your Neo4j-OGM based project and provide your label via the configuration.
This can be done by defining it as a static `String` value:[source, java]
----
SessionFactory sessionFactory = new SessionFactory(
new Configuration.Builder()
.withCustomProperty(LabelModificationProvider.CONFIGURATION_KEY, "StaticLabel")
.build());
----or a `Supplier` function:
[source, java]
----
SessionFactory sessionFactory = new SessionFactory(
new Configuration.Builder()
.withCustomProperty(LabelModificationProvider.CONFIGURATION_KEY, (Supplier) () -> "DynamicLabel")
.build());
----=== Limitations
There are some limitations at the moment.==== Tested support for 3.4.x only
This extension is built against Neo4j's `openCypher-frontend` and uses specific _3.4_ packages.
It may work with any other _3.1+_ version of Neo4j in server mode.If you are using this extension with an embedded Neo4j instance, it might end up in version conflicts regarding Scala, as there will be multiple Scala runtimes in your class path.
==== Limited keywords
The API used doesn't provide means for generating a string representation of all Cypher parts, so we might not support correct rewriting of all valid statements.
Due to this fact it is near to impossible to test against every possible statement.NOTE: Also the conversion for the supported keywords themselves might be incomplete regarding its inner statements.
The keywords supported right now are:
* `Return`
* `Match`
* `With`
* `Create`
* `Unwind`
* `Set`
* `Delete`
* `Merge`
* _Custom procedure calls_