git clone ''

(ql:quickload :neo4cl)

neo4cl - a CL library for interacting with Neo4J

Short description:

From the Neo4J website: “Neo4j is a highly scalable native graph database.”

Graph databases emphasise the relationships between things, and the information to be found there, in contrast to the relational focus on the things themselves. They are typically much more flexible in their definitions of things than RDBMSes, which fits well with Lisp's fluid approach to functionality.

Neo4J is a very popular graph database that scales well. It implements a property graph, which means you can assign attributes to relationships as well as to nodes, and its query language (Cypher) is very expressive. It's an excellent transactional database which satisfies the ACID model, in contrast to something like RDF, which is better suited to data warehousing where responsiveness is traded off for more semantic richness.

Neo4CL is very simple library that takes care of sending Cypher queries to a Neo4J server, and then decoding the responses into something useful for processing in CL. The queries and their responses take the form of alists. This library aims at compliance with Neo4J 3.0 via the HTTP API, based on the documentation in the Neo4J developer manual, and is intended as something to build applications on, more than for interactive use.

What it does

What it doesn't do

What it runs on

It's been tested so far on


All available via Quicklisp:

How it works

It's organised around a neo4j-rest-server object, which holds the details needed for connecting to a Neo4J server. Its initargs and defaults are:

It comes with a suitably basic test-suite, in the package neo4cl-test, which requires the FiveAM framework.

Example usage:

We'll assume it's a default installation of Neo4J, so it's listening on http://localhost:7474, and the username and password are both ‘neo4j’. ``` (defvar server (make-instance 'neo4cl:neo4j-rest-server))

;; First, we change the password. ;; It changes the password stored in server for you, so it continues to “just work.” (neo4cl:change-password server “foobar”)

;; Create some bloke called Andre (neo4cl:neo4j-transaction server `((:STATEMENTS ((:STATEMENT . “CREATE (n:Person { name : {name} }) RETURN n”) (:PARAMETERS . ((:properties . ((:name . “Andre”)))))))))

;; Is he there? (neo4cl:neo4j-transaction server `((:STATEMENTS ((:STATEMENT . “MATCH (x:Person {name: ‘Andre’}) RETURN”)))))

;; We're bored; get rid of him (neo4cl:neo4j-transaction server `((:STATEMENTS ((:STATEMENT . “MATCH (x:Person {name: ‘Andre’}) DELETE x”))))) ```