{"id":13569235,"url":"https://github.com/betrybe/neo4_ecto","last_synced_at":"2025-07-13T13:31:08.150Z","repository":{"id":39660043,"uuid":"358701301","full_name":"betrybe/neo4_ecto","owner":"betrybe","description":"Neo4j Adapter for Ecto","archived":false,"fork":false,"pushed_at":"2024-01-19T16:49:42.000Z","size":44,"stargazers_count":59,"open_issues_count":1,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-30T00:34:11.247Z","etag":null,"topics":["ecto-adapter","elixir","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/neo4_ecto","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/betrybe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-16T19:34:26.000Z","updated_at":"2024-07-23T02:19:46.000Z","dependencies_parsed_at":"2024-06-07T13:09:48.344Z","dependency_job_id":"91bacc81-7d22-4c53-879f-f44eb5ccc53d","html_url":"https://github.com/betrybe/neo4_ecto","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":0.4347826086956522,"last_synced_commit":"dadceea5b4fad7bce3985051315179cd59581510"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betrybe%2Fneo4_ecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betrybe%2Fneo4_ecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betrybe%2Fneo4_ecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betrybe%2Fneo4_ecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betrybe","download_url":"https://codeload.github.com/betrybe/neo4_ecto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225885786,"owners_count":17539640,"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":["ecto-adapter","elixir","hacktoberfest"],"created_at":"2024-08-01T14:00:37.359Z","updated_at":"2024-11-22T10:45:45.394Z","avatar_url":"https://github.com/betrybe.png","language":"Elixir","funding_links":[],"categories":["Projects"],"sub_categories":[],"readme":"# Neo4Ecto\n\nNeo4Ecto is an Ecto adapter that sits on top of [Bolt.Sips](https://github.com/florinpatrascu/bolt_sips) driver.\n\nIt allows you to deal with a [Neo4j](http://neo4j.com) database through Ecto.\n\nCheck out the ([documentation](https://hex.pm/packages/neo4_ecto))\n\n## Installation\n\nAdd the lib to your `mix.exs`\n```elixir\ndef deps do\n  [\n    {:neo4_ecto, \"~\u003e 0.0.2\"}\n  ]\nend\n```\n\nrun: `mix dep.get`\n\nsetup your database config:\n\n```elixir\n# config/dev.exs\n\nconfig :my_app, ecto_repos: [MyApp.Repo]\n\nconfig :my_app, MyApp.Repo,\n  hostname: \"localhost\",\n  basic_auth: [username: \"neo4j\", password: \"neo4j\"],\n  pool_size: 5\n\n# lib/my_app/repo.ex\ndefmodule MyApp.Repo do\n  use Ecto.Repo, otp_app: :my_app, adapter: Ecto.Adapters.Neo4Ecto\nend\n```\n\n\n## Usage\n\nIt's currently available the following Ecto modules: [Schema, Changeset, Repo]\n\nFor example:\n\n```elixir\n# lib/my_app/accounts/user.ex\ndefmodule Accounts.User do\n  use Ecto.Schema\n  import Ecto.Changeset\n\n  schema \"user\" do\n    field :name, :string\n  end\n\n  def changeset(user, attrs) do\n    user\n    |\u003e cast(attrs, [:name])\n  end\nend\n\n# lib/my_app/accounts.ex\ndefmodule Accounts do\n  alias Accounts.User\n  alias MyApp.Repo\n\n  def create_user(attrs) do\n    %User{}\n    |\u003e User.changeset(attrs)\n    |\u003e Repo.insert()\n  end\nend\n\n# lib/my_app/app.ex\ndefmodule Example.App do\n  alias Example.Repo\n\n  def get_user_by_id do\n    Repo.query(\"MATCH (u:User {id: $user_id}) RETURN u;\", %{user_id: 1})\n  end\n\n  def get_user_followers! do\n    Repo.query!(\"MATCH (u:User)-[:FOLLOWS]-\u003e(:User {id: $user_id}) RETURN u;\", %{user_id: 1})\n  end\nend\n```\n\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Running containerized tests with Earthly\n\nIt is also possible to run tests under a containerized environment using [earthly](https://earthly.dev/get-earthly):\n\n    $ earthly -P +setup-code-check\n    $ earthly -P +test-neo4ecto\n\nYou can also use this to interactively debug any tests with diferent images of Neo4j and Elixir.\n\n    $ earthly -P -i --build-arg ELIXIR_BASE=1.12.0-rc.1-erlang-24.0-alpine-3.13.3 +setup-code-check\n    $ earthly -P -i --build-arg ELIXIR_BASE=1.8.2-erlang-20.3.8.26-alpine-3.11.6 --build-arg NEO4J=4.1 +test-neo4ecto\n\n\n## Copyright and License\n\nThe source code is under the Apache 2 License.\n\nCopyright (c) 2021 Trybe\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetrybe%2Fneo4_ecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetrybe%2Fneo4_ecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetrybe%2Fneo4_ecto/lists"}