Skip to content

Example of a cypher modification provider for Neo4j-OGM

License

Notifications You must be signed in to change notification settings

meistermeier/neo4j-ogm-label-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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());

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

About

Example of a cypher modification provider for Neo4j-OGM

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages