{"id":15697135,"url":"https://github.com/jexp/clj-neo4j","last_synced_at":"2025-05-08T23:41:47.813Z","repository":{"id":3701145,"uuid":"4772239","full_name":"jexp/clj-neo4j","owner":"jexp","description":"Small Clojure Wrapper For Neo4j","archived":false,"fork":false,"pushed_at":"2012-06-24T23:14:31.000Z","size":100,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T09:51:18.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jexp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-24T12:47:17.000Z","updated_at":"2013-12-04T21:44:40.000Z","dependencies_parsed_at":"2022-09-16T02:41:15.595Z","dependency_job_id":null,"html_url":"https://github.com/jexp/clj-neo4j","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fclj-neo4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fclj-neo4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fclj-neo4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fclj-neo4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jexp","download_url":"https://codeload.github.com/jexp/clj-neo4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243124949,"owners_count":20240260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T19:12:42.612Z","updated_at":"2025-03-11T22:30:38.660Z","avatar_url":"https://github.com/jexp.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clj-neo4j\n\nclj-neo4j is a tiny clojure wrapper around the embedded neo4j core-api. Currently set-up against 1.8.M04 but should also work with older versions.\n\n## Usage\n\n### Set up Database ###\n\nWith `(graph \"dir\")` you can create a new db-instance which is stored in a global value. Optionally pass in a map of properties.\n\n`(shutdown)` cleans up, there is an automatic shutdown-hook added once. Set the graph database to an existing value, e.g. for testing to\nan in-memory version (set-graph [db]).\n\n### Lookup ###\n\n* (graph) returns the current graph\n* (root) returns the reference node\n* (node id), (rel id), (nodes id1 id2) can be used to look primitives up by id.\n* (all-nodes) and (all-rels) return lazy seq's of each of the types\n* predicates (node?) and (rel?) test for the type of the element\n* (prop [pc :name]) returns a property of a node or rel, (props [pc]) returns all as a map,  (prop-names [pc]) returns all property names\n* relationship information with (start-node), (end-ndoe), (rel-type), (other-node)\n\n### Updates ###\n\nNeo4j is transactiona, so the macro (in-tx [exprs*]) can be used to run other commands transactionally.\n\n* (create [props]) Create a node with the given properties, returns the new node\n* (delete [node or rel]) Deletes the node or relationship\n* (relate [node1 node2 :type props?]), returns a vector with [node1 rel node2] for easy deconstruction\n* (set-props [node or rel] props) sets the map of properties on the element and returns the element\n* (prop [pc :name value]) sets a single property, if value is null it will be removed\n* (create-all [props*]) creates a node for each map provided\n\n### Cypher ###\n* (cypher [query params?]) executes cypher query\n* \n\n### Index Operations ###\n* (index-add node :index :key value) adds a node to an index\n* (lookup :index :key value) retrieves all nodes indexed against this combination (lookup-single ...) finds a single node (or nil)\n\n### Utils ###\n* (clean-db) deletes the content of the current db, useful for testing\n* (cypher-d [query]) realizes the whole query result for multiple inspection\n\n## License\n\nCopyright (C) 2012 Michael Hunger\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fclj-neo4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjexp%2Fclj-neo4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fclj-neo4j/lists"}