Distribution
Driver modules and dependencies
The driver consists of 3 modules:
- neo4j-jdbc
-
This is the actual JDBC implementation for Neo4j
- neo4j-jdbc-translator-spi
-
This is the SPI for the default SQL-to-Cypher translation implementation and for any further or custom implementation.
- neo4j-jdbc-translator-impl
-
This is the default and optional implementation of an SQL-to-Cypher translator. It provides a somewhat opinionated approach of translating SQL statements into semantically equivalent Cypher statements.
If you just want to use the Neo4j JDBC Driver to run Cypher® statements, you only need the module org.neo4j:neo4j-jdbc . As long as you are developing in an environment with proper dependency management, this is all you need to declare.
|
While the translator SPI is a required dependency and gets pulled in via Maven or Gradle, the actual implementation is not. This allows for:
-
Opting out of having additional dependencies if you don’t need the SQL-to-Cypher translation
-
Requiring different JDK baselines or licensing modules for our implementations
-
Allowing you to create alternative translators
Dependencies
There are two "dependency-free" modules, which shade everything into one binary artifact each. Those bundles cover a lot of tooling (see Available bundles).
The driver’s direct, compile-time dependencies are listed below:
org.neo4j:neo4j-jdbc
+- io.github.cdimascio:dotenv-java
+- io.netty:netty-handler
| +- io.netty:netty-common
| +- io.netty:netty-resolver
| +- io.netty:netty-buffer
| +- io.netty:netty-transport
| +- io.netty:netty-transport-native-unix-common
| \- io.netty:netty-codec
+- org.neo4j:neo4j-cypher-dsl-schema-name-support
+- org.neo4j:neo4j-jdbc-translator-spi
Available bundles
All bundles of the Neo4j JDBC Driver are distributed on Maven Central. The bundles have different characteristics: depending on your use-case or your environment, you can pick one or the other bundle, but not both at once.
Individual components
Pick this distribution if you have an application that uses dependencies management in which you don’t have to care about dealing with binary artifacts yourself.
We offer a Maven BOM project, which you should import when using the individual modules, so that you have always a consistent set of versions. The coordinates are org.neo4j:neo4j-jdbc-bom .
|
For Maven, use this dependency declaration:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>6.0.0</version>
</dependency>
And for Gradle you would want to declare the following runtime dependency:
dependencies {
runtimeOnly 'org.neo4j:neo4j-jdbc:6.0.0'
}
If you want to use the SQL-to-Cypher translation from Neo4j, you need to add the following dependency in your Maven build:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-impl</artifactId>
<version>6.0.0</version>
</dependency>
and the same coordinates, but for Gradle:
dependencies {
runtimeOnly 'org.neo4j:neo4j-jdbc-translator-impl:6.0.0'
}
Small bundle
Pick this distribution if you work with ETL tools or tooling for relational databases that allow adding the JDBC driver only as single artifacts or that make it unnecessary hard to add additional jars.
This bundle does not contain the default SQL-to-Cypher translator!
The coordinates of this bundle are org.neo4j:neo4j-jdbc-bundle
and you can download it from Maven central:
All bundles can be used as normal project dependencies as well. This might be useful for example if your project depends on a different, potentially conflicting Netty version. |
Full bundle
This bundle contains the default SQL-to-Cypher translator.
Otherwise, it is identical to the small bundle.
Its coordinates are org.neo4j:neo4j-jdbc-full-bundle
and you can download it from Maven central here:
text2cypher bundle
We also ship a very experimental bundle that we call text2cypher
:
See text2cypher more information.