{"id":13879218,"url":"https://github.com/localytics/odbc_adapter","last_synced_at":"2026-01-10T03:56:31.923Z","repository":{"id":18359692,"uuid":"78684577","full_name":"localytics/odbc_adapter","owner":"localytics","description":"An ActiveRecord ODBC adapter","archived":false,"fork":false,"pushed_at":"2024-08-13T06:49:54.000Z","size":166,"stargazers_count":46,"open_issues_count":19,"forks_count":109,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-27T09:55:50.819Z","etag":null,"topics":["active-record","odbc","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localytics.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":"2017-01-11T22:11:36.000Z","updated_at":"2025-05-08T03:38:26.000Z","dependencies_parsed_at":"2024-01-13T20:57:09.716Z","dependency_job_id":"6d659736-eda6-4b8f-afe5-a2a5ee2b3fae","html_url":"https://github.com/localytics/odbc_adapter","commit_stats":{"total_commits":83,"total_committers":5,"mean_commits":16.6,"dds":0.08433734939759041,"last_synced_commit":"b285f15d9942048a2e8d3fec38fe4e0d2a704bbe"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/localytics/odbc_adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localytics%2Fodbc_adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localytics%2Fodbc_adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localytics%2Fodbc_adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localytics%2Fodbc_adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localytics","download_url":"https://codeload.github.com/localytics/odbc_adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localytics%2Fodbc_adapter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265521436,"owners_count":23781504,"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":["active-record","odbc","rails","ruby"],"created_at":"2024-08-06T08:02:13.811Z","updated_at":"2026-01-10T03:56:31.894Z","avatar_url":"https://github.com/localytics.png","language":"Ruby","readme":"# ODBCAdapter\n\n[![Build Status](https://travis-ci.org/localytics/odbc_adapter.svg?branch=master)](https://travis-ci.org/localytics/odbc_adapter)\n[![Gem](https://img.shields.io/gem/v/odbc_adapter.svg)](https://rubygems.org/gems/odbc_adapter)\n\nAn ActiveRecord ODBC adapter. Master branch is working off of Rails 5.0.1. Previous work has been done to make it compatible with Rails 3.2 and 4.2; for those versions use the 3.2.x or 4.2.x gem releases.\n\nThis adapter will work for basic queries for most DBMSs out of the box, without support for migrations. Full support is built-in for MySQL 5 and PostgreSQL 9 databases. You can register your own adapter to get more support for your DBMS using the `ODBCAdapter.register` function.\n\nA lot of this work is based on [OpenLink's ActiveRecord adapter](http://odbc-rails.rubyforge.org/) which works for earlier versions of Rails.\n\n## Installation\n\nEnsure you have the ODBC driver installed on your machine. You will also need the driver for whichever database to which you want ODBC to connect.\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'odbc_adapter'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install odbc_adapter\n\n## Usage\n\nConfigure your `database.yml` by either using the `dsn` option to point to a DSN that corresponds to a valid entry in your `~/.odbc.ini` file:\n\n```\ndevelopment:\n  adapter:  odbc\n  dsn: MyDatabaseDSN\n```\n\nor by using the `conn_str` option and specifying the entire connection string:\n\n```\ndevelopment:\n  adapter: odbc\n  conn_str: \"DRIVER={PostgreSQL ANSI};SERVER=localhost;PORT=5432;DATABASE=my_database;UID=postgres;\"\n```\n\nActiveRecord models that use this connection will now be connecting to the configured database using the ODBC driver.\n\n## Testing\n\nTo run the tests, you'll need the ODBC driver as well as the connection adapter for each database against which you're trying to test. Then run `DSN=MyDatabaseDSN bundle exec rake test` and the test suite will be run by connecting to your database.\n\n## Testing Using a Docker Container Because ODBC on Mac is Hard\n\nTested on Sierra.\n\n\nRun from project root:\n\n```\nbundle package\ndocker build -f Dockerfile.dev -t odbc-dev .\n\n# Local mount mysql directory to avoid some permissions problems\nmkdir -p /tmp/mysql\ndocker run -it --rm -v $(pwd):/workspace -v /tmp/mysql:/var/lib/mysql odbc-dev:latest\n\n# In container\ndocker/test.sh\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/localytics/odbc_adapter.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalytics%2Fodbc_adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalytics%2Fodbc_adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalytics%2Fodbc_adapter/lists"}