activerecord-import 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f9f37b3a5f830a11ae96be25ce6f5c4b17a0644
4
- data.tar.gz: 54a38cb34a3dcea2712144881922db6391dffb95
3
+ metadata.gz: e0eab7d65f5982398dc619a9b74658f8686fca73
4
+ data.tar.gz: e2eee39f139a44acf97c11f84a834c70e1833418
5
5
  SHA512:
6
- metadata.gz: e5711460969d86ad105727048bb1f86aa323f9bf9f48239b845ec7c2b95d5113e8bf0cf2e7bdafaca5d7a53dc5ce93b57e85e8468b69982c394e8d46d7dbadc5
7
- data.tar.gz: 3877050ee37099c68deafb1f3532d781a4efbf3f50c049787e24676d7cc5131df70782e00f17abaef866766c30212b7cceceee41031cf7e2c834c20f18fbd381
6
+ metadata.gz: 4b12aea6f47a5f45920c58a227a1f62f445f9fb7f33e7226c17c1c3c0bfc0d680bac38d24342bcb3aa847f46c15cddfa1a8f10cc9e946ca0ba52e0ea43afced7
7
+ data.tar.gz: 7ebeae0718cc45a693d986db6f544eadad3c10dcff580403634afbbcd87074cca999a67cf960ed5bb0b438d77737cf09154b88ff701b1068c70cd3a4586a46c7
@@ -1,3 +1,9 @@
1
+ ## Changes in 0.14.1
2
+
3
+ ### Fixes
4
+
5
+ * JRuby/JDBCDriver with PostgreSQL will no longer raise a JDBCDriver error when using the :no_returning boolean option. Thanks to @jkowens via \#287
6
+
1
7
  ## Changes in 0.14.0
2
8
 
3
9
  ### New Features
@@ -6,6 +6,7 @@ module ActiveRecord::Import::PostgreSQLAdapter
6
6
 
7
7
  def insert_many( sql, values, *args ) # :nodoc:
8
8
  number_of_inserts = 1
9
+ ids = []
9
10
 
10
11
  base_sql, post_sql = if sql.is_a?( String )
11
12
  [sql, '']
@@ -14,7 +15,11 @@ module ActiveRecord::Import::PostgreSQLAdapter
14
15
  end
15
16
 
16
17
  sql2insert = base_sql + values.join( ',' ) + post_sql
17
- ids = select_values( sql2insert, *args )
18
+ if post_sql =~ /RETURNING\s/
19
+ ids = select_values( sql2insert, *args )
20
+ else
21
+ insert( sql2insert, *args )
22
+ end
18
23
 
19
24
  ActiveRecord::Base.connection.query_cache.clear
20
25
 
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Import
3
- VERSION = "0.14.0".freeze
3
+ VERSION = "0.14.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis