Renaming ActiveRecord::Extensions to ActiveRecord::Import.

This commit is contained in:
Zach Dennis 2010-09-26 17:05:02 -04:00
parent 948dec0be2
commit 90057c43eb
12 changed files with 17 additions and 17 deletions

View file

@ -1,2 +1,2 @@
require File.join File.dirname(__FILE__), "activerecord-import/base"
ActiveRecord::Extensions.load
ActiveRecord::Import.load

View file

@ -3,8 +3,8 @@ require "activerecord-import/adapters/abstract_adapter"
module ActiveRecord # :nodoc:
module ConnectionAdapters # :nodoc:
class AbstractAdapter # :nodoc:
extend ActiveRecord::Extensions::Import::AbstractAdapter::ClassMethods
include ActiveRecord::Extensions::Import::AbstractAdapter::InstanceMethods
extend ActiveRecord::Import::AbstractAdapter::ClassMethods
include ActiveRecord::Import::AbstractAdapter::InstanceMethods
end
end
end

View file

@ -2,5 +2,5 @@ require "active_record/connection_adapters/mysql2_adapter"
require "activerecord-import/adapters/mysql_adapter"
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
include ActiveRecord::Extensions::Import::MysqlAdapter::InstanceMethods
include ActiveRecord::Import::MysqlAdapter::InstanceMethods
end

View file

@ -2,5 +2,5 @@ require "active_record/connection_adapters/mysql_adapter"
require "activerecord-import/adapters/mysql_adapter"
class ActiveRecord::ConnectionAdapters::MysqlAdapter
include ActiveRecord::Extensions::Import::MysqlAdapter::InstanceMethods
include ActiveRecord::Import::MysqlAdapter::InstanceMethods
end

View file

@ -2,6 +2,6 @@ require "active_record/connection_adapters/postgresql_adapter"
require "activerecord-import/adapters/postgresql_adapter"
class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
include ActiveRecord::Extensions::Import::PostgreSQLAdapter::InstanceMethods
include ActiveRecord::Import::PostgreSQLAdapter::InstanceMethods
end

View file

@ -2,6 +2,6 @@ require "active_record/connection_adapters/sqlite3_adapter"
require "activerecord-import/adapters/sqlite3_adapter"
class ActiveRecord::ConnectionAdapters::Sqlite3Adapter
include ActiveRecord::Extensions::Import::Sqlite3Adapter::InstanceMethods
include ActiveRecord::Import::Sqlite3Adapter::InstanceMethods
end

View file

@ -1,4 +1,4 @@
module ActiveRecord::Extensions::Import::AbstractAdapter
module ActiveRecord::Import::AbstractAdapter
NO_MAX_PACKET = 0
QUERY_OVERHEAD = 8 #This was shown to be true for MySQL, but it's not clear where the overhead is from.

View file

@ -1,9 +1,9 @@
module ActiveRecord::Extensions::Import::MysqlAdapter
module ActiveRecord::Import::MysqlAdapter
module InstanceMethods
def self.included(klass)
klass.instance_eval do
include ActiveRecord::Extensions::Import::ImportSupport
include ActiveRecord::Extensions::Import::OnDuplicateKeyUpdateSupport
include ActiveRecord::Import::ImportSupport
include ActiveRecord::Import::OnDuplicateKeyUpdateSupport
end
end

View file

@ -1,4 +1,4 @@
module ActiveRecord::Extensions::Import::PostgreSQLAdapter
module ActiveRecord::Import::PostgreSQLAdapter
module InstanceMethods
def next_value_for_sequence(sequence_name)
%{nextval('#{sequence_name}')}

View file

@ -1,4 +1,4 @@
module ActiveRecord::Extensions::Import::Sqlite3Adapter
module ActiveRecord::Import::Sqlite3Adapter
module InstanceMethods
def next_value_for_sequence(sequence_name)
%{nextval('#{sequence_name}')}

View file

@ -2,9 +2,9 @@ require "pathname"
require "active_record"
require "active_record/version"
module ActiveRecord::Extensions
module ActiveRecord::Import
AdapterPath = File.join File.expand_path(File.dirname(__FILE__)), "/active_record/adapters"
# Loads the import functionality for a specific database adapter
def self.require_adapter(adapter)
require File.join(AdapterPath,"/abstract_adapter")

View file

@ -1,8 +1,8 @@
require "ostruct"
module ActiveRecord::Extensions::ConnectionAdapters ; end
module ActiveRecord::Import::ConnectionAdapters ; end
module ActiveRecord::Extensions::Import #:nodoc:
module ActiveRecord::Import #:nodoc:
module ImportSupport #:nodoc:
def supports_import? #:nodoc:
true