module ActiveRecord::Import::AbstractAdapter::InstanceMethods
Public Instance Methods
after_import_synchronize( instances )
click to toggle source
Synchronizes the passed in ActiveRecord
instances with the records in the database by calling reload
on each instance.
# File lib/activerecord-import/adapters/abstract_adapter.rb, line 40 def after_import_synchronize( instances ) instances.each(&:reload) end
max_allowed_packet()
click to toggle source
Returns the maximum number of bytes that the server will allow in a single packet
# File lib/activerecord-import/adapters/abstract_adapter.rb, line 70 def max_allowed_packet NO_MAX_PACKET end
next_value_for_sequence(sequence_name)
click to toggle source
# File lib/activerecord-import/adapters/abstract_adapter.rb, line 3 def next_value_for_sequence(sequence_name) %(#{sequence_name}.nextval) end
pre_sql_statements(options)
click to toggle source
# File lib/activerecord-import/adapters/abstract_adapter.rb, line 22 def pre_sql_statements(options) sql = [] sql << options[:pre_sql] if options[:pre_sql] sql << options[:command] if options[:command] sql << "IGNORE" if options[:ignore] # add keywords like IGNORE or DELAYED if options[:keywords].is_a?(Array) sql.concat(options[:keywords]) elsif options[:keywords] sql << options[:keywords].to_s end sql end
supports_on_duplicate_key_update?()
click to toggle source
# File lib/activerecord-import/adapters/abstract_adapter.rb, line 74 def supports_on_duplicate_key_update? false end