clojurewerkz/ogre

Name: ogre

Owner: ClojureWerkz

Description: Clojure library for querying Apache TinkerPop graphs

Created: 2013-03-12 14:59:19.0

Updated: 2018-01-09 16:23:11.0

Pushed: 2018-01-12 00:17:27.0

Homepage: http://ogre.clojurewerkz.org/

Size: 3709

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ogre

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.

Project Goals
Community

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.

Project Maturity

Despite being first released in 2014, Orge is a relatively young project that regained active development in 2016. Most of Ogre's features are driven by changes to Apache TinkerPop (specifically the Traversal API) which has largely stabilized itself in over the course of the 3.2.x line of code. As a result, Ogre tends to be fairly stable with its implementation of that API. Ogre also implements the TinkerPop Process Test Suite, which helps validate that Ogre is compliant with Gremlin.

Ogre currently targets TinkerPop 3.3.x.

Artifacts

Orge artifacts are released to Clojars. Maven users should add the following repository definition to your pom.xml:

ository>
d>clojars.org</id>
rl>http://clojars.org/repo</url>
pository>
The Most Recent Release

With Leiningen:

[clojurewerkz/ogre "3.3.1.0"]

With Maven:

<dependency>
  <groupId>clojurewerkz</groupId>
  <artifactId>ogre</artifactId>
  <version>3.3.1.0</version>
</dependency>
Documentation & Examples

You'll need to choose a TinkerPop-enabled graph database and add that to your project's dependencies. Here we use the in-memory graph database implementation provided by org.apache.tinkerpop/tinkergraph-gremlin:

=> (load "clojurewerkz/ogre/core")

=> (in-ns 'clojurewerkz.ogre.core)
ect[clojure.lang.Namespace 0x2bcfe59c "clojurewerkz.ogre.core"]
urewerkz.ogre.core=> (def graph (open-graph {(Graph/GRAPH) (.getName org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph)}))
ojurewerkz.ogre.core/graph
urewerkz.ogre.core=> (def g (traversal graph))
ojurewerkz.ogre.core/g
urewerkz.ogre.core=> (org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory/generateModern graph)

urewerkz.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!))
" "marko", "c" "marko"} {"a" "josh", "c" "marko"} {"a" "peter", "c" "marko"})

Ogre has more complete documentation here.

Supported Clojure Versions

Orge requires Clojure 1.8+. The most recent stable release is always recommended.

Continuous Integration

Build Status

Development

Orge uses Leiningen 2. Once installed and run tests using:

lein test
License

Copyright © 2014-2017 Zack Maril, and the ClojureWerkz team. Copyright © 2017 Stephen Mallette, Zack Maril, and the ClojureWerkz team.

Licensed under the Eclipse Public License (the same as Clojure).

Acknowledgements

Joe Lee illustrated the “Gremlin Ogre” image based on the original Clojurewerkz Ogre logo and Apache TinkerPop's Gremlin character developed Ketrina Yim.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.