Denis Knauf
038a29682e
import_many, import_*: returns last_inserted_id
2013-01-03 17:07:10 +01:00
Ben Woosley
8d20594f12
Replace #sum_sizes with calls to ActiveSupport #sum, as splatting large numbers of values is resource intensive andcan cause stack overflows of the sort 'SystemStackError: stack level too deep'
2011-08-16 17:01:11 -07:00
Jamie Cobbett
6555fd70ba
Correctly obey MySQL MAX PACKET
...
Use String's bytesize instead of size, because we're talking about byte length,
not string length. This resolves a problem on Ruby 1.9 with multi-byte
characters.
2011-05-08 21:35:47 +00:00
Zach Dennis
161cf017f9
Renamed #values_sql_for_column_names_and_attributes to #values_sql_for_columns_and_attributes and cleaned up how it dealt with columns.
...
* added back in the support for type-casting based on the database column
* removed unused method in ActiveRecord::Import::AbstractAdapter
https://github.com/zdennis/activerecord-import/issues#issue/5
2011-01-10 22:36:52 -05:00
Ben Woosley
6b2153a841
Simplify values_sql_for_column_names_and_attributes with #map
2011-01-10 22:11:51 -05:00
Ben Woosley
7aefcf1164
Inline multiple_value_sets_insert_sql because it never changes, isn't particularly well-factored, and for parity with "not supports_import?"
2011-01-10 21:57:41 -05:00
Zach Dennis
8fbf841fde
Use ActiveRecord Column#type_cast to properly parse fields represented by a string.
...
Fixed issued reported by Nick Burdick where imported datetime fields was not correctly working with certain string formats for MySQL which doesn't support MM/DD/YYYY format directly.
2011-01-05 19:09:55 -05:00
Zach Dennis
90057c43eb
Renaming ActiveRecord::Extensions to ActiveRecord::Import.
2010-09-26 17:05:02 -04:00
Zach Dennis
948dec0be2
Refactoring to allow for separation of activerecord-import code and activerecord's connection adapters.
2010-09-26 16:51:19 -04:00