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.
- Github
- For the latest edge code:
git clone git://github.com/aeden/adapter_extensions.git.
-
Use It!
Once you've installed the gem you can add the following lines to any Ruby script to use the adapter extensions:
require 'rubygems' 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-2009, All Rights Reserved
Anthony's Email:anthonyeden@gmail.com
Anthony's Email:anthonyeden@gmail.com