Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A wrapper around neo4j ( ) in the Clojure language

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 src Removed reflection and lookup method. June 07, 2012
Octocat-spinner-32 test core/property now returns nil if key doesn't exist. June 06, 2012
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.markdown
Octocat-spinner-32 license.txt Licensed in the public domain. December 06, 2008
Octocat-spinner-32 project.clj Added tests, removed vars, updated docs. April 27, 2012

A Neo4j library for Clojure

The clojure-neo4j project provides a lispy interface to Neo4j, a graph-structured on-disk transactional database.

Get It

The latest version, 0.3.0-SNAPSHOT, is available from clojars.

Add [clojure-neo4j "0.3.0-SNAPSHOT"] to your project's dependency list and fetch with lein deps.


lein jar


(use '[neo4j.core :exclude [open shutdown]])

(def db (neo4j.core/open "/path/to/db"))

;;; Create a root for customers and add a customer.
(with-tx db
  (let [customer-root (new-node db) 
        bob (new-node db)]
    (relate (top-node db) :customers customer-root)
    (relate customer-root :customer bob)
    (properties bob {"name" "Bob"
                     "age" 30
                     "id" "C12345"})))

;;; Fetch all customer IDs
(with-tx db
  (let [customer-root (-> (top-node db)
                          (.getSingleRelationship (relationship :customers) outgoing)
    (doall (map #(property % "id") 
                (traverse customer-root
                          (depth-of 1)
                          {:customer outgoing})))))

(neo4j.core/shutdown db)
Something went wrong with that request. Please try again.