diff --git a/project.clj b/project.clj index b2fe02d..1974219 100644 --- a/project.clj +++ b/project.clj @@ -29,19 +29,27 @@ ;; neo4j [gorillalabs/neo4j-clj "4.1.0"] - [org.neo4j.test/neo4j-harness "4.0.0"] + [org.neo4j.test/neo4j-harness "4.2.1" + :exclusions + [com.fasterxml.jackson.core/jackson-core + commons-codec]] ;; additional server side libs [buddy/buddy-hashers "1.7.0" - :exclusions [commons-codec]] + :exclusions + [com.fasterxml.jackson.dataformat/jackson-dataformat-smile + com.fasterxml.jackson.dataformat/jackson-dataformat-cbor + com.fasterxml.jackson.core/jackson-core + org.bouncycastle/bcprov-jdk15on + org.bouncycastle/bcpkix-jdk15on + commons-codec + cheshire + tigris]] [clj-time "0.15.2"] [markdown-clj "1.10.5"] [dorothy "0.0.7"]] - :profiles {:dev {:plugins [;; neo4j db - [joshavg/lein-neo4j "0.5.0"] - - ;; web stuff + :profiles {:dev {:plugins [;; web stuff [lein-less "1.7.5"] ;; code quality diff --git a/src/wanijo/infrastructure/neo4j.clj b/src/wanijo/infrastructure/neo4j.clj index fd4b58a..fdac842 100644 --- a/src/wanijo/infrastructure/neo4j.clj +++ b/src/wanijo/infrastructure/neo4j.clj @@ -68,7 +68,12 @@ (str (butiful-query qry) "
---Params---
" params)) - (qry session params)))) + ;; neo4j-clj returns lazy lists, but when we leave with-open, + ;; the ResultSet (?) is already closed, so the list cannot + ;; be processed + ;; doall to the rescue to force the list to be evaluated + ;; eagerly + (doall (qry session params))))) (spec/def ::tuple-query-list (spec/coll-of diff --git a/src/wanijo/schema/db.clj b/src/wanijo/schema/db.clj index 2dbf976..86e8b34 100644 --- a/src/wanijo/schema/db.clj +++ b/src/wanijo/schema/db.clj @@ -5,7 +5,7 @@ (neo4j/defquery all-created-by "MATCH (s:schema)-[:created_by]->(u:user) - WHERE u.uuid = {uuid} + WHERE u.uuid = $uuid RETURN s ORDER BY s.name") (defn all-created-by! [user-uuid]