Skip to content

Commit

Permalink
Updated project.clj to reflect new version as well as reference 1.0 n…
Browse files Browse the repository at this point in the history
…eo4j libraries. Updated neo4j.clj to reference new package structure and class names per 1.0 API.
  • Loading branch information
Tom Pierce committed Jun 13, 2010
1 parent 3bcbb8d commit 1285089
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
10 changes: 6 additions & 4 deletions project.clj
@@ -1,8 +1,10 @@
(defproject clojure-neo4j "0.1.0"
(defproject clojure-neo4j "0.2.0"
:description "The clojure-neo4j project provides a more lispy interface to Neo4j, a graph-structured on-disk transactional database."
:dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[org.neo4j/neo "1.0-b11"]
[org.neo4j/index-util "0.9"]]
[org.neo4j/neo4j-kernel "1.0"]
[org.neo4j/neo4j-index "1.0"]]
:repositories [["org.neo4j" "http://m2.neo4j.org"]]
:dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]])
:dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]
[swank-clojure "1.1.0"]
[leiningen/lein-swank "1.1.0"]])
33 changes: 16 additions & 17 deletions src/neo4j.clj
@@ -1,19 +1,18 @@
(ns neo4j
(:import (org.neo4j.api.core Direction
EmbeddedNeo
NeoService
Node
NotFoundException
NotInTransactionException
PropertyContainer
Relationship
RelationshipType
ReturnableEvaluator
StopEvaluator
Transaction
TraversalPosition
Traverser
Traverser$Order)))
(:import (org.neo4j.graphdb Direction
Node
NotFoundException
NotInTransactionException
PropertyContainer
Relationship
RelationshipType
ReturnableEvaluator
StopEvaluator
Transaction
TraversalPosition
Traverser
Traverser$Order)
(org.neo4j.kernel EmbeddedGraphDatabase)))

(declare properties)

Expand All @@ -22,7 +21,7 @@

(defn start
[db-path]
(alter-var-root #'*neo* (fn [_] (EmbeddedNeo. db-path))))
(alter-var-root #'*neo* (fn [_] (EmbeddedGraphDatabase. db-path))))

(defn shutdown
[]
Expand All @@ -49,7 +48,7 @@
(def all-but-start ReturnableEvaluator/ALL_BUT_START_NODE)

(defmacro with-neo [#^String fname & body ]
`(binding [*neo* (new ~EmbeddedNeo ~fname)]
`(binding [*neo* (new ~EmbeddedGraphDatabase ~fname)]
(try ~@body
(finally (.shutdown *neo*)))))

Expand Down

0 comments on commit 1285089

Please sign in to comment.