{"id":13412377,"url":"https://github.com/jmcvetta/neoism","last_synced_at":"2025-03-14T18:31:21.356Z","repository":{"id":3911513,"uuid":"5000397","full_name":"jmcvetta/neoism","owner":"jmcvetta","description":"Neo4j client for Golang","archived":false,"fork":false,"pushed_at":"2020-02-16T09:28:03.000Z","size":837,"stargazers_count":390,"open_issues_count":13,"forks_count":57,"subscribers_count":25,"default_branch":"develop","last_synced_at":"2024-07-31T20:50:51.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jmcvetta.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-07-12T07:42:33.000Z","updated_at":"2024-06-20T01:47:03.000Z","dependencies_parsed_at":"2022-09-17T05:02:14.054Z","dependency_job_id":null,"html_url":"https://github.com/jmcvetta/neoism","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcvetta%2Fneoism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcvetta%2Fneoism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcvetta%2Fneoism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcvetta%2Fneoism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmcvetta","download_url":"https://codeload.github.com/jmcvetta/neoism/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221441880,"owners_count":16821984,"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-07-30T20:01:24.020Z","updated_at":"2024-10-26T04:30:29.146Z","avatar_url":"https://github.com/jmcvetta.png","language":"Go","funding_links":[],"categories":["数据库驱动","Database Drivers","Go","Connectors","数据库驱动程序","Generators","数据库驱动`连接和操作数据库工具`","REST API","數據庫驅動","NoSQL Databases","Data Integration Frameworks","\u003cspan id=\"数据库驱动-database-drivers\"\u003e数据库驱动 Database Drivers\u003c/span\u003e"],"sub_categories":["Advanced Console UIs","NoSQL Database Drivers","REST API","NoSQL数据库驱动程序","SQL 查询语句构建库","Other","高級控制台界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"readme":"neoism - Neo4j client for Go\n===========================\n\n![Neoism Logo](https://raw.github.com/jmcvetta/neoism/master/neoism.png)\n\nPackage `neoism` is a [Go](http://golang.org) client library providing access to\nthe [Neo4j](http://www.neo4j.org) graph database via its REST API.\n\n\n# Status\n\n| System    | Status                                                                                                                  |\n|-----------|:-----------------------------------------------------------------------------------------------------------------------:|\n| Travis CI | [![Travis CI](https://travis-ci.org/jmcvetta/neoism.png?branch=master)](https://travis-ci.org/jmcvetta/neoism)          |\n| CircleCI  | [![CircleCI](https://circleci.com/gh/jmcvetta/neoism.svg?style=svg)](https://circleci.com/gh/jmcvetta/neoism)           | \n| Coveralls | [![Coveralls](https://img.shields.io/coveralls/jmcvetta/neoism/master.svg)](https://coveralls.io/r/jmcvetta/neoism)     |\n| Codecov   | [![Codecov](https://img.shields.io/codecov/c/github/jmcvetta/neoism/master.svg)](https://codecov.io/gh/jmcvetta/neoism) |\n\nThis driver is fairly complete, and may now be suitable for general use.  The\ncode has an extensive set of integration tests, but little real-world testing.\nYMMV; use in production at your own risk.\n\n\n# Requirements\n\n[Go 1.1](http://golang.org/doc/go1.1) or later is required.\n\nTested against Neo4j 2.2.4 and Go 1.4.1.\n\n\n# Installation\n\n## Development\n\n```\ngo get -v github.com/jmcvetta/neoism\n```\n\n\n## Stable\n\nNeoism is versioned using [`gopkg.in`](http://gopkg.in).  \n\nCurrent release is `v1`\n\n```\ngo get gopkg.in/jmcvetta/neoism.v1\n```\n\n\n# Documentation\n\nSee [GoDoc](http://godoc.org/github.com/jmcvetta/neoism) or\n[Go Walker](http://gowalker.org/github.com/jmcvetta/neoism) for \nautomatically generated documentation.\n\n\n# Usage\n\n## Connect to Neo4j Database\n\n```go\ndb, err := neoism.Connect(\"http://localhost:7474/db/data\")\n```\n\n## Create a Node\n\n```go\nn, err := db.CreateNode(neoism.Props{\"name\": \"Captain Kirk\"})\n```\n\n\n## Issue a Cypher Query\n\n```go\n// res will be populated with the query results.  It must be a slice of structs.\nres := []struct {\n\t\t// `json:` tags matches column names in query\n\t\tA   string `json:\"a.name\"` \n\t\tRel string `json:\"type(r)\"`\n\t\tB   string `json:\"b.name\"`\n\t}{}\n\n// cq holds the Cypher query itself (required), any parameters it may have \n// (optional), and a pointer to a result object (optional).\ncq := neoism.CypherQuery{\n\t// Use backticks for long statements - Cypher is whitespace indifferent\n\tStatement: `\n\t\tMATCH (a:Person)-[r]-\u003e(b)\n\t\tWHERE a.name = {name}\n\t\tRETURN a.name, type(r), b.name\n\t`,\n\tParameters: neoism.Props{\"name\": \"Dr McCoy\"},\n\tResult:     \u0026res,\n}\n\n// Issue the query.\nerr := db.Cypher(\u0026cq)\n\n// Get the first result.\nr := res[0]\n```\n\n## Issue Cypher queries with a transaction\n\n```go\ntx, err := db.Begin(qs)\nif err != nil {\n  // Handle error\n}\n\ncq0 := neoism.CypherQuery{\n  Statement: `MATCH (a:Account) WHERE a.uuid = {account_id} SET balance = balance + {amount}`,\n  Parameters: neoism.Props{\"uuid\": \"abc123\", amount: 20},\n}\nerr = db.Cypher(\u0026cq0)\nif err != nil {\n  // Handle error\n}\n\ncq1 := neoism.CypherQuery{\n  Statement: `MATCH (a:Account) WHERE a.uuid = {account_id} SET balance = balance + {amount}`,\n  Parameters: neoism.Props{\"uuid\": \"def456\", amount: -20},\n}\nerr = db.Cypher(\u0026cq1)\nif err != nil {\n  // Handle error\n}\n\nerr := tx.Commit()\nif err != nil {\n  // Handle error\n}\n```\n\n\n# Roadmap\n\n\n## Completed:\n\n* Node (create/edit/relate/delete/properties)\n* Relationship (create/edit/delete/properties)\n* Legacy Indexing (create/edit/delete/add node/remove node/find/query)\n* Cypher queries\n* Batched Cypher queries\n* Transactional endpoint (Neo4j 2.0)\n* Node labels (Neo4j 2.0)\n* Schema index (Neo4j 2.0)\n* Authentication (Neo4j 2.2)\n\n\n## To Do:\n\n* Streaming API support - see Issue [#22](https://github.com/jmcvetta/neoism/issues/22)\n* ~~Unique Indexes~~ - probably will not expand support for legacy indexing.\n* ~~Automatic Indexes~~ - \"\n* High Availability\n* Traversals - May never be supported due to security concerns.  From the\n  manual:  \"The Traversal REST Endpoint executes arbitrary Groovy code under\n  the hood as part of the evaluators definitions. In hosted and open\n  environments, this can constitute a security risk.\"\n* Built-In Graph Algorithms\n* Gremlin\n\n\n# Testing\n\nNeoism's test suite respects, but does not require, a `NEO4J_URL` environment\nvariable.  By default it assumes Neo4j is running on `localhost:7474`, with\nusername `neo4j` and password `foobar`.  \n\n```bash\nexport NEO4J_URL=http://your_user:your_password@neo4j.yourdomain.com/db/data/\ngo test -v .\n```\n\nIf you are using a fresh untouched Neo4j instance, you can use the included\n`set_neo4j_password.sh` script to set the password to that expected by Neoism's\ntests:\n\n```bash\nsh set_neo4j_password.sh\n```\n\n\n# Support\n\nSupport and consulting services are available from [Silicon Beach Heavy\nIndustries](http://siliconheavy.com).\n\n\n# Contributing\n\nContributions in the form of Pull Requests are gladly accepted.  Before\nsubmitting a PR, please ensure your code passes all tests, and that your\nchanges do not decrease test coverage.  I.e. if you add new features also add\ncorresponding new tests.\n\n\n\n# License\n\nThis is Free Software, released under the terms of the [GPL\nv3](http://www.gnu.org/copyleft/gpl.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcvetta%2Fneoism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmcvetta%2Fneoism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcvetta%2Fneoism/lists"}