Skip to content

The Best GraphTraversal DSL(e.g. Cypher, Gremlin, nGQL)

License

Notifications You must be signed in to change notification settings

leobgz/maple-dsl

 
 

Repository files navigation


A powerful, flexible, lightning-fast graph query DSL

Features

  • Support popular graph query language (e.g. Cypher, nGQL, etc)
  • Out-of-the-box dsl interfaces for operate graph database.
  • Powerful and flexible predicate/selection/traversal condition wrapper.
  • Lambda-style API Lambda

Getting started

Prepare dependency

Inclusion of the Cypher-DSL in a Maven project

<dependency>
  <groupId>com.maple</groupId>
  <artifactId>maple-cypher-dsl</artifactId>
  <version>0.1.0</version>
</dependency>

Inclusion of the Nebula-DSL in a Maven project

<dependency>
  <groupId>com.maple</groupId>
  <artifactId>maple-nebula</artifactId>
  <version>0.1.0</version>
</dependency>

How to use

// i.e. List all Tom Hanks movies released in the 1990s
var statement = G.traverse(G.vertex("Person").eq("name", "Tom Hanks"))
    .outE("ACTED_IN")
    .outV("tomHanksMovies", "Movie", it -> it
      .gte("released", 1990)
      .lt("released", 2000)
      .selectAs("released", "movie_released")
      .selectAs("name", "movie_name"))
    .render();

var result = sessionTemplate.selectMaps(statement);

More on Wiki.

About

The Best GraphTraversal DSL(e.g. Cypher, Gremlin, nGQL)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%