Permalink
Browse files

Updated project.clj to reflect new version as well as reference 1.0 n…

…eo4j libraries. Updated neo4j.clj to reference new package structure and class names per 1.0 API.
  • Loading branch information...
1 parent 3bcbb8d commit 128508942873f9a4025208f34a2680e54345a606 Tom Pierce committed Jun 13, 2010
Showing with 22 additions and 21 deletions.
  1. +6 −4 project.clj
  2. +16 −17 src/neo4j.clj
View
10 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"]])
View
33 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)
@@ -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
[]
@@ -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*)))))

0 comments on commit 1285089

Please sign in to comment.