Commit graph

147 commits

Author SHA1 Message Date
Denis Knauf 038a29682e import_many, import_*: returns last_inserted_id 2013-01-03 17:07:10 +01:00
Zach Dennis 1c675d7c31 Merge branch 'michael-groble_master' 2012-12-14 10:29:46 -05:00
Zach Dennis 6697e2b4db Ensuring that the geo spatial adapters are successfully wired up and working with base import functionality.
[#47]
2012-12-14 10:29:04 -05:00
michael groble eec20355e5 support rgeo spatial database adapter names 2012-12-14 10:08:46 -05:00
Zach Dennis 5f0e220038 Merge branch 'dougo_clear-new-record-on-synchronize' 2012-12-14 10:03:51 -05:00
Doug Orleans d0c1055b65 Fix example in doc comment. 2012-12-14 09:59:59 -05:00
Doug Orleans 9fd19a36bd Also clear the destroyed flag after synchronizing. 2012-12-14 09:59:58 -05:00
Doug Orleans 413e35fedd Add failing test for destroyed records.
Also, generalize the previous test to use persisted? rather than !new_record?.
2012-12-14 09:59:58 -05:00
Doug Orleans 31ff20a332 Fix failing test - clear @new_record on synchronize. 2012-12-14 09:59:58 -05:00
Doug Orleans 58cac8bfb0 Test that no records are new after synchronize, not all.
Also fix the spelling of :synchronize_keys.
2012-12-14 09:59:58 -05:00
Zach Dennis 082a95df0e Merge branch 'sishen_master' 2012-12-14 09:51:29 -05:00
Dingding Ye 1ae5122642 Performance improvements.
* Serialize the column using specified coder before inserting
* Cache the ActiveRecord connection once per call to generate values SQL
* Call sequence_name last since it's more expensive
2012-12-14 09:50:36 -05:00
Zach Dennis ec2059e802 assert_include => assert_includes 2012-12-14 09:49:54 -05:00
Zach Dennis a4f17e6d45 Merge remote-tracking branch 'chewi/scope-awareness' 2012-12-14 09:40:03 -05:00
Zach Dennis 394e0b51c3 Version bump to 0.2.11 2012-10-05 13:10:38 -04:00
Zach Dennis ee5604d4d5 Merge pull request #67 from mildmojo/fix_sqlite3_adapter_spelling
Fix case-sensitive SQLite3 adapter name typos.
2012-10-01 06:44:46 -07:00
mildmojo 43bd628e05 Fixes case-sensitive SQLite3 adapter name typos.
The SQLite3 adapter name was referenced as
`ActiveRecord::ConnectionAdapters::Sqlite3Adapter`, but the
ActiveRecord class is spelled `SQLite3Adapter` (upper-case "SQL"). As
a result, `active_record/adapters/sqlite3_adapter.rb` wasn't actually
including the methods from `adapters/sqlite3_adapter.rb` into the AR
adapter class.

This adds a test for proper inheritance and fixes the spelling of
`SQLite3Adapter`, unifying all references to the ActiveRecord version.
2012-10-01 03:08:07 -04:00
James Le Cuirot 22473145d1 Add scope-awareness feature 2012-09-20 15:15:21 +01:00
Zach Dennis c08d31b528 Merge pull request #65 from jabley/missing-column
Provide more detailed error message
2012-09-14 08:00:18 -07:00
James Abley b03af0cd3e Provide more detailed error message
If we don't have a mapping for a column name, provide the column name
as well as the index in the array.
2012-09-14 14:01:00 +01:00
Zach Dennis 6182b944ef Merge pull request #56 from grzuy/support_all_or_none_records
Adds support for :all_or_none option on #import
2012-08-29 20:48:18 -07:00
Zach Dennis 0b03543612 Merge pull request #58 from alexagranov/e6cafdb23a64e68a246a838565afaecf6faf952a
The jdbcmysql_adapter was left out of the InstanceMethods refactoring.
2012-08-29 20:47:07 -07:00
Zach Dennis b4bc1466f1 Adding gemspec. To re-generate use: rake gemspec:generate 2012-08-29 23:45:16 -04:00
Zach Dennis 75a63d77d1 Merge pull request #62 from spectator/seamless_database_pool
Seamless database pool adapter
2012-08-29 20:41:52 -07:00
Zach Dennis 0e14c5f643 Version bump to 0.2.10 2012-08-29 23:38:02 -04:00
Yury Velikanau 190fcd32ff Remove remain of ruby-debug-19 from Gemfile.lock 2012-08-22 19:51:47 -07:00
Yury Velikanau 1d9b30cf83 Put together tests for seamless_database_pool adapter 2012-08-22 19:50:37 -07:00
Yury Velikanau 23a07371dd Add seamless_database_pool gem 2012-08-22 19:49:48 -07:00
Yury Velikanau 151c2f271f Gemfile.lock changes for debugger gem 2012-08-22 19:49:27 -07:00
Yury Velikanau 7628e0a9d8 debugger gem supports ruby 1.9.3 just fine 2012-08-22 18:57:41 -07:00
Yury Velikanau de048bb61e Remove whitespace. 2012-08-22 18:57:15 -07:00
Evan Petrie 9ee02d87ff fix file name 2012-08-22 18:44:48 -07:00
Evan Petrie cc0185abb3 make work with seamless database pool 2012-08-22 18:44:37 -07:00
Zach Dennis 2bb1150e00 Merge pull request #61 from benpickles/missing-column-error
Raise a useful message when passing validate: false and a value doesn't have a corresponding column
2012-08-20 05:53:45 -07:00
Ben Pickles f12d72b0b1 Raise a useful message when a value doesn't have a corresponding column. 2012-08-19 19:41:02 +01:00
Zach Dennis a1a183e43d Updating Gemfile to latest versions of libraries:
* updating deprecated require 'rake/rdoctask' with 'rdoc/task'
* preparing to remove deprecated ActiveRecord set_table_name with self.table_name=
2012-08-06 09:24:34 -04:00
Zach Dennis b500ebe5a1 Updating tests around working with non-standard ActiveRecord models with non-sequence based primary keys.
* move into test/import_test so it runs across all supported adapters

[#60]
2012-08-06 09:23:01 -04:00
Zach Dennis 71a393d000 Merge pull request #60 from jluxenberg/master
Model#import fails to find model's primary key sequence
2012-08-06 06:10:43 -07:00
Jared Luxenberg e12f9c4951 Model#import fails to find model's primary key sequence
Fixes a bug where Model#import does not work when a model's primary key
has no associated 'sequence' in the database. If a value for the primary
key is specified, then the insert should not require a database
'sequence' to generate a value for that primary key field.
2012-08-04 17:35:50 -07:00
Gonzalo Rodriguez eac7d5f949 Adds support for :all_or_none option on #import 2012-05-19 17:40:04 -03:00
Zach Dennis f74bd2fbbd Merge pull request #51 from seamusabshere/patch-1
memoize MySQL's max_allowed_packet
2012-05-03 17:09:20 -07:00
Seamus Abshere b36259af29 Solving #50 - memoize MySQL's max_allowed_packet instead of querying it every time you run .import 2012-03-20 16:40:10 -05:00
Alex Agranov e6cafdb23a somehow the jdbcmysql_adapter was left out in the refactoring that removed usage of the InstanceMethods module 2012-02-28 19:31:55 -05:00
Zach Dennis 3dc99c357d Merge pull request #46 from ebarendt/patch-1
Update README.markdown with correct link
2012-02-17 10:54:22 -08:00
Eric Barendt 8544641260 Update README.markdown 2012-02-15 15:38:37 -08:00
Zach Dennis 41952485a4 Version bump to 0.2.9 2012-01-20 17:50:58 -05:00
Zach Dennis b5c550860c Bumping sqlite3 dependency for development 2012-01-20 17:50:27 -05:00
Zach Dennis a5a9928b26 Making activerecord dependency be require a version of activerecord 3.x. https://github.com/zdennis/activerecord-import/pull/43 2012-01-20 17:48:04 -05:00
Zach Dennis 7fa043cf31 Merge pull request #43 from duckpond/c9a4313f8ba5805bfcca314a5b93d4720130de10
Active record dependency does not work with rails 3.2
2012-01-20 14:38:59 -08:00
Samantha John c9a4313f8b remove dependency on activerecord 3.0 2012-01-20 16:07:53 -05:00