GithubHelp home page GithubHelp logo

doytsujin / cypher-dsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neo4j-contrib/cypher-dsl

0.0 1.0 0.0 61.78 MB

A Java DSL for the Cypher Query Language

Home Page: http://neo4j-contrib.github.io/cypher-dsl

License: Apache License 2.0

Shell 0.04% Java 99.96%

cypher-dsl's Introduction

The Neo4j Cypher-DSL

badge measure?project=org measure?project=org Maven Central

The Neo4j Cypher-DSL in its current form is a spin-off from Spring Data Neo4j 6+ (né Spring Data Neo4j⚡️RX), where it is used to generate all Cypher queries. We thank all contributors to all branches prior to 2020.0 for their effort in creating the previous verions.

The primary goal of this project is to have a type safe way of creating Cypher queries targeted at Neo4j 4.0+. Most of the constructs used here are modelled after openCypher, but we include several constructs specific to Neo4j.

The core module of the Neo4j Cypher-DSL has no required runtime dependencies.

Versioning

This rebooted version of the Neo4j Cypher-DSL uses CalVer in the same way Spring does since early 2020 (see Updates to Spring Versions), starting at 2020.0.0.

Manual

For a gentle introduction and some getting started guides, please use our Manual.

Getting Started

Adding the necessary dependencies

First, include the dependency to the Neo4j Cypher-DSL under the following coordinates: org.neo4j:neo4j-cypher-dsl:

Maven configuration

Inclusion of the Neo4j Cypher-DSL in a Maven project
<dependency>
	<groupId>org.neo4j</groupId>
	<artifactId>neo4j-cypher-dsl</artifactId>
	<version>2022.7.3</version>
</dependency>

Gradle configuration

Inclusion of the Neo4j Cypher-DSL in a Gradle project
dependencies {
    implementation 'org.neo4j:neo4j-cypher-dsl:2022.7.3'
}

A simple example

With the Cypher-DSL, you can build your queries starting with the static methods provided through org.neo4j.cypherdsl.core.Cypher. Static imports for those packages should be allowed:

import static org.neo4j.cypherdsl.core.Cypher.*;

import org.neo4j.cypherdsl.core.Cypher;

class SimpleExample {

    public static void main(String... a) {

        var m = node("Movie").named("m");
        var statement = Cypher.match(m)
            .returning(m)
            .build();

        System.out.println(statement.getCypher());
        // Prints MATCH (m:`Movie`) RETURN m
    }
}

Required Java Version

The minimal required Java version to use the Cypher-DSL core module is Java 8. The reason for staying on JDK 8 is the fact that the Cypher-DSL is widely used in Spring Data Neo4j 6+. Spring Data Neo4j shares JDK 8 as baseline with the Spring Framework until Spring Framework 6 is released.

The minimal required JDK version to build the Cypher-DSL is JDK 11. To build the native examples, GraalVM 11 is required.

Licensing

The Cypher-DSL itself is licenced under the Apache License 2.0, the parser module is licensed under the GNU General Public License 3.

cypher-dsl's People

Contributors

michael-simons avatar dependabot[bot] avatar jexp avatar rickardoberg avatar meistermeier avatar nawroth avatar andy2003 avatar systay avatar ractive avatar tbaum avatar wgorder avatar wouterv avatar romain-rossi avatar hindog avatar fbiville avatar timmystorms avatar simpsonjulian avatar treo avatar aakashsorathiya avatar aldrinm avatar davided avatar thephil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.