This projects provides a limited support for manipulating Cypher statements and adding an additional label to all nodes in the statement.
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:
SessionFactory sessionFactory = new SessionFactory(
new Configuration.Builder()
.withCustomProperty(LabelModificationProvider.CONFIGURATION_KEY, "StaticLabel")
.build());
or a Supplier
function:
SessionFactory sessionFactory = new SessionFactory(
new Configuration.Builder()
.withCustomProperty(LabelModificationProvider.CONFIGURATION_KEY, (Supplier) () -> "DynamicLabel")
.build());
There are some limitations at the moment.
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.
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