This namespace contains the logic to connect to Neo4j instances, create and run queries as well as creating an in-memory database for testing.
This namespace contains the logic to connect to Neo4j instances, create and run queries as well as creating an in-memory database for testing.
(connect uri)
(connect uri options)
(connect uri user password)
(connect uri user password options)
Returns a connection map from an url. Uses BOLT as the only communication protocol.
You can connect using a url or a url, user, password combination. Either way, you can optioninally pass a map of options:
:logging
- a Neo4j logging configuration, e.g. (ConsoleLogging. Level/FINEST)
Returns a connection map from an url. Uses BOLT as the only communication protocol. You can connect using a url or a url, user, password combination. Either way, you can optioninally pass a map of options: `:logging` - a Neo4j logging configuration, e.g. (ConsoleLogging. Level/FINEST)
(create-in-memory-connection)
To make the local db visible under the same interface/map as remote databases, we connect to the local url. To be able to shutdown the local db, we merge a destroy function into the map that can be called after testing.
All data will be wiped after shutting down the db!
Deprecated: Please use neo4j-clj.in-memory/create-in-memory-connection
directly.
To make the local db visible under the same interface/map as remote databases, we connect to the local url. To be able to shutdown the local db, we merge a destroy function into the map that can be called after testing. _All_ data will be wiped after shutting down the db! Deprecated: Please use `neo4j-clj.in-memory/create-in-memory-connection` directly.
(create-query cypher)
Convenience function. Takes a cypher query as input, returns a function that takes a session (and parameter as a map, optionally) and return the query result as a map.
Convenience function. Takes a cypher query as input, returns a function that takes a session (and parameter as a map, optionally) and return the query result as a map.
(defquery name query)
Shortcut macro to define a named query.
Shortcut macro to define a named query.
(with-retry [connection tx & {:keys [max-times] :or {max-times 1000}}] & body)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close