{"id":13513879,"url":"https://github.com/elixir-ecto/ecto_sql","last_synced_at":"2025-05-13T15:11:16.173Z","repository":{"id":37804443,"uuid":"151455245","full_name":"elixir-ecto/ecto_sql","owner":"elixir-ecto","description":"SQL-based adapters for Ecto and database migrations","archived":false,"fork":false,"pushed_at":"2025-05-09T13:34:35.000Z","size":2110,"stargazers_count":618,"open_issues_count":5,"forks_count":320,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-05-09T14:48:13.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/ecto_sql","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/elixir-ecto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2018-10-03T17:48:11.000Z","updated_at":"2025-05-09T13:34:39.000Z","dependencies_parsed_at":"2024-02-26T01:49:44.815Z","dependency_job_id":"bf07f5fd-90ea-4a3f-9f4c-0316fc24ddae","html_url":"https://github.com/elixir-ecto/ecto_sql","commit_stats":{"total_commits":717,"total_committers":186,"mean_commits":"3.8548387096774195","dds":0.7377963737796374,"last_synced_commit":"63457162c2a6a4e4912c0bacce260fae534f3bf0"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-ecto%2Fecto_sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-ecto%2Fecto_sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-ecto%2Fecto_sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-ecto%2Fecto_sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-ecto","download_url":"https://codeload.github.com/elixir-ecto/ecto_sql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969259,"owners_count":21992263,"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-08-01T05:00:39.430Z","updated_at":"2025-05-13T15:11:11.160Z","avatar_url":"https://github.com/elixir-ecto.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":[],"readme":"Ecto SQL\n=========\n\n[![Build Status](https://github.com/elixir-ecto/ecto_sql/workflows/CI/badge.svg)](https://github.com/elixir-ecto/ecto_sql/actions)\n\nEcto SQL ([documentation](https://hexdocs.pm/ecto_sql)) provides building blocks for writing SQL adapters for Ecto. It features:\n\n  * The Ecto.Adapters.SQL module as an entry point for all SQL-based adapters\n  * Default implementations for Postgres (Ecto.Adapters.Postgres), MySQL (Ecto.Adapters.MyXQL), and MSSQL (Ecto.Adapters.Tds)\n  * A test sandbox (Ecto.Adapters.SQL.Sandbox) that concurrently runs database tests inside transactions\n  * Support for database migrations via Mix tasks\n\nTo learn more about getting started, [see the Ecto repository](https://github.com/elixir-ecto/ecto).\n\n## Running tests\n\nClone the repo and fetch its dependencies:\n\n    $ git clone https://github.com/elixir-ecto/ecto_sql.git\n    $ cd ecto_sql\n    $ mix deps.get\n    $ mix test\n\nIn case you are modifying Ecto and EctoSQL at the same time, you can configure EctoSQL to use an Ecto version from your machine by running:\n\n    $ ECTO_PATH=../ecto mix test.all\n\n### Running integration tests\n\nThe command above will run unit tests. EctoSQL also has a suite of integration tests for its built-in adapters: `pg`, `myxql` and `tds`. If you are changing logic specific to a database, we recommend running its respective integration test suite as well. Doing so requires you to have the database available locally. MySQL and PostgreSQL can be installed directly on most systems. For MSSQL, you may need to run it as a Docker image:\n\n    docker run -d -p 1433:1433 --name mssql -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=some!Password' mcr.microsoft.com/mssql/server:2017-latest\n\nOnce the database is running, you can run tests against a specific Ecto adapter by using the `ECTO_ADAPTER` environment variable:\n\n    $ ECTO_ADAPTER=pg mix test\n\nYou may also run `mix test.all` to run the unit tests and all integration tests. You can also use a local Ecto checkout if desired:\n\n    $ ECTO_PATH=../ecto mix test.all\n\n### Running containerized tests\n\nIt is also possible to run the integration tests under a containerized environment using [earthly](https://earthly.dev/get-earthly). You will also need Docker installed on your system. Then you can run:\n\n    $ earthly -P +all\n\nYou can also use this to interactively debug any failing integration tests using the corresponding commands:\n\n    $ earthly -P -i --build-arg ELIXIR_BASE=1.8.2-erlang-20.3.8.26-alpine-3.11.6 --build-arg MYSQL=5.7 +integration-test-mysql\n    $ earthly -P -i --build-arg ELIXIR_BASE=1.8.2-erlang-20.3.8.26-alpine-3.11.6 --build-arg MSSQL=2019  +integration-test-mssql\n    $ earthly -P -i --build-arg ELIXIR_BASE=1.8.2-erlang-20.3.8.26-alpine-3.11.6 --build-arg POSTGRES=11.11 +integration-test-postgres\n\nThen once you enter the containerized shell, you can inspect the underlying databases with the respective commands:\n\n    PGPASSWORD=postgres psql -h 127.0.0.1 -U postgres -d postgres ecto_test\n    MYSQL_PASSWORD=root mysql -h 127.0.0.1 -uroot -proot ecto_test\n    sqlcmd -U sa -P 'some!Password'\n\n## License\n\nCopyright (c) 2012 Plataformatec \\\nCopyright (c) 2020 Dashbit\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%2Felixir-ecto%2Fecto_sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-ecto%2Fecto_sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-ecto%2Fecto_sql/lists"}