Find file History
Pull request Compare This branch is even with zdennis:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
benchmarks
config
db/migrate
lib
tests
ChangeLog
README
Rakefile
ar-extensions.gemspec
init.rb

README

*ar-extensions is not compatible and is not being developed for Rails 3. Please use the activerecord-import gem which supports the same interface.*

LICENSE
----------
This is licensed under the ruby license. 

Author: Zach Dennis
Web Site: http://www.continuousthinking.com/tags/arext
Email: zach.dennis@gmail.com

 - For How-To information see http://www.continuousthinking.com/tags/arext
 - For project information and feedback please consult http://rubyforge.org/projects/arext/
 - For release information please see below

ActiveRecord::Extensions 0.9.5
------------------------------
April 29th, 2011
 - Removed erroneous "Can't mass assign protected attribute :id" when importing models

ActiveRecord::Extensions 0.9.4
------------------------------
April 6, 2011
 - Added :synchronize_keys option for import which allows people to synchronize on specified fields besides the primary key. Note these fields should be unique

ActiveRecord::Extensions 0.9.0, 0.9.1
------------------------------
April 17, 2009
 - Added MySQL support for save, create, replace options - :ignore, :on_duplicate_key_update, :keywords, :reload, :keywords, :pre_sql, :post_sql
 - Added MySQL support for find options: :keywords, :pre_sql, :post_sql, :index_hint
 - Added MySQL support for find_union and count_union
 - Added MySQL support for insert_select
 - Added MySQL support for delete_duplicates and delete_all :batch_size => X
 - Updated :on_duplicate_update_key to accept a string in addition to array
 - Fixed Find Extension Range bug to exclude end when ... used instead of ..
 
ActiveRecord::Extensions 0.8.2
------------------------------
March 16th, 2009
 - Rails 2.3.1 and 2.3.2 compatibility added 
 - Rails 2.1.2 and 2.2.2 compatibility preserved

AciveRecord::Extensions 0.7.0
-----------------------------
July 20th, 2007
 - Fixes timezone issue (thanks Michael Flester)
 - Adds better finder and import support for Oracle (thanks Michael Flester)
 - Committed patch to fix MySQL query padding, thanks to Gabe da Silveira
 - Added functionality for MySQL to work with created_on, created_at, updated_on or updated_at fields
 - Added more test coverage for import functionality 
 
ActiveRecord::Extensions 0.6.0
------------------------------
May 5th, 2007
 - Fixed bug with URI escaped strings and the Comparison better finder extension
 - Added support for arrays with the Like better finder extension when using the '_contains' suffix
 - Added 'synchronize' support for ActiveRecord::Base instances when using Import functionality

ActiveRecord::Extensions 0.5.2
------------------------------
March 14th, 2007
 - Fixed Rubyforge bug #8996 by renaming alias in finders.rb to the ActiveRecord::Base#quote method

ActiveRecord::Extensions 0.5.1
------------------------------
March 14th, 2007
 - Released as a rubygem
 - Added a .gemspec file

ActiveRecord::Extensions 0.5.0
------------------------------
March 13th, 2007
 - Added Time based query support which works on ActiveRecord columns which match a type supported by :datetime

ActiveRecord::Extensions 0.4.0
------------------------------
February 11th, 2007
 - Added to_csv functionality
 - Added temporary table support (MySQL)
 - Added foreign key support (MySQL)
 - Updated tests to keep schema information. Test database will automatically rebuild themselves if they are out of sync
 - Added dependency for Mocha 0.4.0 or higher for tests

ActiveRecord::Extensions 0.3.0
------------------------------
December 29th, 2006
 - Updates to the lib/ directory structure to avoid namespace issues.
 - Updates to the Rakefile to run an external ruby process for tests rather then the same 
   ruby process that runs the rake tasks

ActiveRecord::Extensions 0.2.0
------------------------------
December 22nd, 2006
 - Updates to_csv method for arrays returned by ActiveRecord::Base.find
 - Adds does_not_match suffix for regular expression based conditions, ie: :field_does_not_match => /regex/
 - Adds not_between suffix for ange based conditions, ie: :id_not_between => ( 0 .. 1 )
 - Adds SQLite and SQLite3 support for better finders.
 - Updates rake tasks for sqlite and sqlite3.
 - Added rake tasks to use database migrations rather then raw SQL schema files.

ActiveRecord::Extensions 0.1.0
-------------------------------
December 16th, 2006
 - Adds to_csv method to arrays returned by ActiveRecord::Base.find. 
 - Fixes bug in ActiveRecord::Extensions::Registry when processing key/value pairs where
   the order of certain Extensions was not handled correctly due to Hash usage.
 - Refactoring of ActiveRecord::Extensions::Registry
 - Added more tests for better finder support 

ActiveRecord::Extensions 0.0.6
------------------------------
December 5th, 2006
 - Added generic support for import functionality for all adapters
 - Includes rake testing tasks for postgresql
 - Includes postgresql support for all extensions except for full text searching (which is only mysql)
 - Refactored directory structure of tests, import functionality and fulltext functionality


ActiveRecord::Extensions 0.0.5
------------------------------
October 20th, 2006.
 - Fixes two bugs which broke normal ActiveRecord behavior
 - Fully complaint with Rails 1.1.0 thru 1.1.6 (and all ActiveRecord versions released with those)
 - Inlcudes new Rakefile
 - Includes rake task "test:mysql" which allows ActiveRecord::Extensions to be tested with mysql
 - Includes rake test "test:activerecord:mysql" which allows ActiveRecord's tests to be tested with the
   ActiveRecord::Extensions library


ActiveRecord::Extensions 0.0.4
-------------------------------
August 26th, 2006. Released at RubyConf*MI.
September 24th, 2006, Rubyforge release.
 - Inlcudes "Better Finder" support for ActiveRecord
http://blogs.mktec.com/zdennis/pages/ARE_finders


ActiveRecord::Extensions 0.0.3
-------------------------------
Released.... ????
 - the project has been named ActiveRecord::Extensions.


ActiveRecord::Optimizations 0.0.2
---------------------------------
July 20th, 11:27pm, Zach Dennis

This includes some of the optimizations for the ActiveRecord::Base. This release only supports the MysqlAdapter, although other adapters will be supported in upcoming releases.

HOW-TO USAGE
------------
Require the two files in the lib/ directory and then create records using:
  Model.create array_of_hashes

Example:
  class LogEntry < ActiveRecord::Base ; end
  LogEntry.import [ { :log_entry_name=>"Name" }, {:log_entry_name=>"Name2"}, ... ], :optimize=>true

Using the optimized create method will return the number of inserts performed, rather then an array of LogEntry objects. This currently skips model validation.


CHANGELOG
----------
0.0.2
 - add some documentation to the updated methods for ActiveRecord and MysqlAdapter
 - renamed the create optimizatin to import. Multi-value inserts can be obtained using ActiveRecord::Base.import
0.0.1
 - introduced updates to ActiveRecord::Base.create to support multi-value inserts


UPCOMING
----------
 - model validation on imports
 - postgresql support for imports
 - ability to use regular expressions for db searches
 - ability to use db functions
 - temporary table support
 - memory table support
 - complex update with on duplicate key update support