All Projects → localytics → Odbc_adapter

localytics / Odbc_adapter

Licence: mit
An ActiveRecord ODBC adapter

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Odbc adapter

Activerecord Sqlserver Adapter
SQL Server Adapter For Rails
Stars: ✭ 910 (+2427.78%)
Mutual labels:  rails
Activeadmin froala editor
Froala WYSIWYG editor for ActiveAdmin
Stars: ✭ 30 (-16.67%)
Mutual labels:  rails
Render async
render_async lets you include pages asynchronously with AJAX
Stars: ✭ 974 (+2605.56%)
Mutual labels:  rails
Activejob Perform later
Make any method perfomed later with ActiveJob
Stars: ✭ 21 (-41.67%)
Mutual labels:  rails
Administrate Field Belongs to search
Plugin that adds search capabilities to belongs_to associations for Administrate
Stars: ✭ 29 (-19.44%)
Mutual labels:  rails
Ctf Scoreboard
Repository for the MITRE Capture the Flag scoreboard.
Stars: ✭ 30 (-16.67%)
Mutual labels:  rails
Pres
A Simple Rails Presenter
Stars: ✭ 15 (-58.33%)
Mutual labels:  rails
Buttercms Rails
Rails SDK for ButterCMS (https://buttercms.com)
Stars: ✭ 35 (-2.78%)
Mutual labels:  rails
Versionist
A plugin for versioning Rails based RESTful APIs.
Stars: ✭ 950 (+2538.89%)
Mutual labels:  rails
Tolaria
A Rails CMS framework for making your editors happy.
Stars: ✭ 33 (-8.33%)
Mutual labels:  rails
Discourse
A platform for community discussion. Free, open, simple.
Stars: ✭ 34,626 (+96083.33%)
Mutual labels:  rails
Activeadmin trumbowyg
Trumbowyg Editor for ActiveAdmin
Stars: ✭ 29 (-19.44%)
Mutual labels:  rails
Soci
Official repository of the SOCI - The C++ Database Access Library
Stars: ✭ 960 (+2566.67%)
Mutual labels:  odbc
Eosio sql plugin
EOSIO sql database plugin
Stars: ✭ 21 (-41.67%)
Mutual labels:  odbc
Ununiga
[은는이가] 한글 조사(助詞) 대응 I18n engine extension
Stars: ✭ 34 (-5.56%)
Mutual labels:  rails
Hold please
📞 Disable ActiveRecord callbacks in Rails for great justice!
Stars: ✭ 20 (-44.44%)
Mutual labels:  rails
Docker War
Docker based Wargame Platform - To practice your CTF skills
Stars: ✭ 30 (-16.67%)
Mutual labels:  rails
Ultra light wizard
No time to manage a wizard state machine, session variables, or complicated controllers? Use ultra light wizard!! A RESTful session-less validation-friendly simple multi-step form approach in Rails.
Stars: ✭ 35 (-2.78%)
Mutual labels:  rails
Activeadmin blaze theme
ActiveAdmin theme based on Blaze CSS toolkit
Stars: ✭ 35 (-2.78%)
Mutual labels:  rails
Instagram Scheduler
📷 Beautiful way to get shadowbanned on Instagram by ⏰ scheduling your 🌁 photos.
Stars: ✭ 33 (-8.33%)
Mutual labels:  rails

ODBCAdapter

Build Status Gem

An 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.

This 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.

A lot of this work is based on OpenLink's ActiveRecord adapter which works for earlier versions of Rails.

Installation

Ensure 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.

Add this line to your application's Gemfile:

gem 'odbc_adapter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install odbc_adapter

Usage

Configure 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:

development:
  adapter:  odbc
  dsn: MyDatabaseDSN

or by using the conn_str option and specifying the entire connection string:

development:
  adapter: odbc
  conn_str: "DRIVER={PostgreSQL ANSI};SERVER=localhost;PORT=5432;DATABASE=my_database;UID=postgres;"

ActiveRecord models that use this connection will now be connecting to the configured database using the ODBC driver.

Testing

To 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.

Testing Using a Docker Container Because ODBC on Mac is Hard

Tested on Sierra.

Run from project root:

bundle package
docker build -f Dockerfile.dev -t odbc-dev .

# Local mount mysql directory to avoid some permissions problems
mkdir -p /tmp/mysql
docker run -it --rm -v $(pwd):/workspace -v /tmp/mysql:/var/lib/mysql odbc-dev:latest

# In container
docker/test.sh

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/localytics/odbc_adapter.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].