Neocons 2.0.0-beta3 is released
TL;DR
Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.
2.0.0-beta3
is a development milestone that adds support to
remaining Neo4J 2.0 features. It is 100% backwards compatible.
Changes between Neocons 2.0.0-beta2 and 2.0.0-beta3
Constraints Support (Neo4J 2.0 Only)
clojurewerkz.neocons.rest.constraints
is a new namespace that
implements Neo4J 2.0 constraints.
(require '[clojurewerkz.neocons.rest.constraints :as cts])
;; create a uniqueness constraint
(cts/create-unique "Person" :name)
;; get constraint info
(cts/get-unique "Person" :name)
;; drop a constraint
(cts/drop "Person" :name)
Labels Support (Neo4J 2.0 Only)
clojurewerkz.neocons.rest.labels
is a new namespace that provides
support for labels in Neo4J 2.0.
It is possible to add, replace, remove and retrieve labels to/from a node.
To add labels to a node, use clojurewerkz.neocons.rest.labels/add
:
(require '[clojurewerkz.neocons.rest.labels :as nl])
(nl/add node ["neo4j" "clojure"])
To add replaces all labels on a node, use clojurewerkz.neocons.rest.labels/replace
:
(require '[clojurewerkz.neocons.rest.labels :as nl])
(nl/replace node ["graph" "database"])
Deleting a label from a node is possible with clojurewerkz.neocons.rest.labels/remove
:
(require '[clojurewerkz.neocons.rest.labels :as nl])
(nl/remove node "database")
clojurewerkz.neocons.rest.labels/get-all-labels
is the function that lists
either all labels in the database (w/o arguments) or on a specific node
(1-arity):
(require '[clojurewerkz.neocons.rest.labels :as nl])
(nl/get-all-labels node)
;= [all labels]
(nl/get-all-labels node)
;= [labels on node]
Change Log
We encourage all users to give this version (and Neo4J 2.0!) a try.
Neocons change log is available on GitHub.
Neocons is a ClojureWerkz Project
Neocons is part of the group of libraries known as ClojureWerkz, together with
- Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
- Elastisch, a minimalistic Clojure client for ElasticSearch
- Monger, a Clojure MongoDB client for a more civilized age
- Welle, a Riak client with batteries included
- Quartzite, a powerful scheduling library
and several others. If you like Neocons, you may also like our other projects.
Let us know what you think on Twitter or on the Clojure mailing list.
Michael on behalf of the ClojureWerkz Team