Ogre is a Clojure Gremlin Language Variant of the Gremlin graph traversal language from Apache Tinkerpop. Like Gremlin, it can be used to query any graphs that are TinkerPop-enabled.
- Provide an API that enhances the expressivity of Gremlin when working in Clojure.
- Expose the features of TinkerPop as it makes sense in Clojure.
- Don't introduce any significant amount of performance overhead.
Questions related to Ogre can be asked on the clojure-titanium mailing list.
To subscribe for announcements of releases, important changes and so on, please follow @ClojureWerkz on Twitter.
Despite being first released in 2014, Orge is a relatively young
project that regained active development in 2016. We are targeting
Gremlin 3.2.0
development releases.
Orge artifacts are released to Clojars. Maven users should add the following repository definition to your pom.xml
:
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
With Leiningen:
[clojurewerkz/ogre "3.0.0.0-beta2"]
With Maven:
<dependency>
<groupId>clojurewerkz</groupId>
<artifactId>ogre</artifactId>
<version>3.0.0.0-beta2</version>
</dependency>
clojurewerkz.ogre.core=> (def graph (open-graph))
#'clojurewerkz.ogre.core/graph
clojurewerkz.ogre.core=> (def g (traversal graph))
#'clojurewerkz.ogre.core/g
clojurewerkz.ogre.core=> (org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory/generateModern graph)
nil
clojurewerkz.ogre.core=> (traverse g V (match
#_=> (__ (as :a) (out :created) (as :b))
#_=> (__ (as :b) (has :name "lop"))
#_=> (__ (as :b) (in :created) (as :c))
#_=> (__ (as :c) (has :age 29)))
#_=> (select :a :c) (by :name)
#_=> (into-seq!))
({"a" "marko", "c" "marko"} {"a" "josh", "c" "marko"} {"a" "peter", "c" "marko"})
Orge requires Clojure 1.6+. The most recent stable release is always recommended.
Orge uses Leiningen 2. Once installed and run tests against supported Clojure versions using:
lein all test
Copyright (C) 2014-2016 Zack Maril, and the ClojureWerkz team.
Licensed under the Eclipse Public License (the same as Clojure).
Joe Lee illustrated the "Gremlin Ogre" image based on the original Clojurewerkz Ogre logo and Apache TinkerPop's Gremlin character developed Ketrina Yim.