Adapter Extensions
Extending Rails' ActiveRecord Adapters
Getting started
Adapter Extensions provided extended capabilities for the database adapters in the Ruby on Rails ActiveRecord component. Currently the following adapters are supported:
- MySQL
- PostgreSQL
- SQL Server
Here’s how to get rolling:
-
Get It
There are several ways to get the Adapter Extensions:
- Install the Gem
- Get to your command line and type
sudo gem install adapter_extensionson Linux or OS X or typegem install adapter_extensionson Windows. AdapterExtensions depends on ActiveRecord, ActiveSupport and FasterCSV. If necessary you may have to approve the installation of these dependencies if they are not already installed. - Download
- You can also download the packages in Zip, Gzip, or Gem format from the ActiveWarehouse files section on RubyForge.
- Subversion Checkout
- For the brave you can get the latest code from the Subversion repository. To get the code from the subversion repository you may use the following command line:
svn co svn://rubyforge.org/var/svn/activewarehouse/adapter_extensions/trunk.
-
Use It!
Once you've installed the gem you can add the following lines to any Ruby script to use the adapter extensions:
gem 'adapter_extensions' require 'adapter_extensions'
What's There Now?
Right now the library does the following:
- Adds bulk_load method which uses the database's native bulk loading tool to load the flat file data
- Adds a truncate method to the abstract adapter
- Implemented for: MySQL, PostgreSQL and SQL Server
- Unit tests included
Copyright 2007, All Rights Reserved
Anthony's Email:anthonyeden@gmail.com
Anthony's Email:anthonyeden@gmail.com