ibm_db 3.0.2-x86-mingw32 → 3.0.3-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9aeb7e6cd0f64d1c84a0d7be4049dd8a18ffcd64
4
- data.tar.gz: 9a856f14da707fef0a02f30499f80046c3542854
3
+ metadata.gz: fc61b87a039dda5ae75c43a0eb6ba61adc422304
4
+ data.tar.gz: 53e84cbb5eb0936d820120f220d0734c230bedbe
5
5
  SHA512:
6
- metadata.gz: b74d987fd0cce5dd674910ea9b5f492c2c7c57160196cd15d0e94507ce4a483eb8f7e185bfffbcf0e54b660d1a84069348f5432cb5338bc7d61f68ee3a28e3c3
7
- data.tar.gz: 72a7c1fd492d04b853febc647712e1841b9fe162afbc523dc374a8aafd38d0a7d612b2110e121fd025b696edbbf40a5bbeffd09d59e62304f586fe0f74b4e051
6
+ metadata.gz: 2a7123381b4d70fd4c616fcd646da0f3af0758d78cc4d2819fe7b495ea790f8c1d756b5ac68d56c22b33c32704438a90057945ac3b2c6a7714a663454045bc69
7
+ data.tar.gz: 8a403dddc0c235b2ea311652729593e16209df06c58bae9cf199e1edd829426557baceca9b5c7de402f258db7a5b5d5d9f177fbc41367119cf81f1ac492b37e6
data/CHANGES CHANGED
@@ -1,5 +1,8 @@
1
1
  Change Log
2
2
  ==============
3
+ 2016/06/17 (IBM_DB adapter 3.0.3, driver 3.0.3)
4
+ - Fixed issue #59 - Can't Update Binary Files Using 3.0.x (with Ruby 2.1.0 and Rails 4.2.6)
5
+
3
6
  2016/05/24 (IBM_DB adapter 3.0.2, driver 3.0.2)
4
7
  - Fixed issue #52 - Invalid foreign key ON UPDATE action specified in schema.rb
5
8
  - Fixed issue #59 - Can't Upload Binary Files Using 3.0.x (with Ruby 2.1.0 and Rails 4.2.6)
data/ext/ibm_db.c CHANGED
@@ -12,7 +12,7 @@
12
12
  +----------------------------------------------------------------------+
13
13
  */
14
14
 
15
- #define MODULE_RELEASE "3.0.2"
15
+ #define MODULE_RELEASE "3.0.3"
16
16
 
17
17
  #ifdef HAVE_CONFIG_H
18
18
  #include "config.h"
@@ -770,7 +770,7 @@ module ActiveRecord
770
770
  else
771
771
  arel
772
772
  end
773
- end
773
+ end
774
774
  end
775
775
  # This adapter supports migrations.
776
776
  # Current limitations:
@@ -1146,9 +1146,16 @@ module ActiveRecord
1146
1146
  if binds.nil? || binds.empty?
1147
1147
  return insert_direct(sql, name, pk, id_value, sequence_name)
1148
1148
  end
1149
-
1149
+
1150
+ new_binds = Hash.new
1151
+ param_array = binds.map do |column,value|
1152
+ if column && column.sql_type.to_s =~ /binary|blob/i
1153
+ new_binds [column] = value
1154
+ end
1155
+ end
1156
+
1150
1157
  clear_query_cache if defined? clear_query_cache
1151
- if stmt = exec_insert(sql, name, binds)
1158
+ if stmt = exec_insert(sql, name, new_binds)
1152
1159
  begin
1153
1160
  @sql << sql
1154
1161
  return id_value || @servertype.last_generated_id(stmt)
@@ -1326,8 +1333,15 @@ module ActiveRecord
1326
1333
  if binds.nil? || binds.empty?
1327
1334
  update_direct(sql, name)
1328
1335
  else
1329
- begin
1330
- if stmt = exec_query(sql,name,binds)
1336
+ begin
1337
+ new_binds = Hash.new
1338
+ param_array = binds.map do |column,value|
1339
+ if column && column.sql_type.to_s =~ /binary|blob/i
1340
+ new_binds [column] = value
1341
+ end
1342
+ end
1343
+
1344
+ if stmt = exec_query(sql,name,new_binds)
1331
1345
  IBM_DB.num_rows(stmt)
1332
1346
  end
1333
1347
  ensure
@@ -1946,10 +1960,11 @@ module ActiveRecord
1946
1960
 
1947
1961
  def foreign_keys(table_name)
1948
1962
  #fetch the foreign keys of the table using function foreign_keys
1963
+ #PKTABLE_NAME:: fk_row[2] Name of the table containing the primary key.
1949
1964
  #PKCOLUMN_NAME:: fk_row[3] Name of the column containing the primary key.
1950
- #FKTABLE_NAME:: fk_row[6] Name of the table containing the foreign key.
1951
- #FKCOLUMN_NAME:: fk_row[7] Name of the column containing the foreign key.
1952
- #FK_NAME:: fk_row[11] The name of the foreign key.
1965
+ #FKTABLE_NAME:: fk_row[6] Name of the table containing the foreign key.
1966
+ #FKCOLUMN_NAME: fk_row[7] Name of the column containing the foreign key.
1967
+ #FK_NAME:: fk_row[11] The name of the foreign key.
1953
1968
 
1954
1969
  table_name = @servertype.set_case(table_name.to_s)
1955
1970
  foreignKeys = []
@@ -1966,8 +1981,8 @@ module ActiveRecord
1966
1981
  primary_key: fk_row[3],
1967
1982
  }
1968
1983
  options[:on_update] = extract_foreign_key_action(fk_row[9])
1969
- options[:on_delete] = extract_foreign_key_action(fk_row[10])
1970
- foreignKeys << ForeignKeyDefinition.new(table_name, fk_row[2], options)
1984
+ options[:on_delete] = extract_foreign_key_action(fk_row[10])
1985
+ foreignKeys << ForeignKeyDefinition.new(fk_row[6], table_name, options)
1971
1986
  end
1972
1987
 
1973
1988
  rescue StandardError => fetch_error # Handle driver fetch errors
@@ -2543,12 +2558,14 @@ SET WITH DEFAULT #{@adapter.quote(default)}"
2543
2558
  # This method generates the default blob value specified for
2544
2559
  # DB2 Dataservers
2545
2560
  def set_binary_default(value)
2546
- "BLOB('#{value}')"
2561
+ #"BLOB('#{value}')"
2562
+ "?"
2547
2563
  end
2548
2564
 
2549
2565
  # This method generates the blob value specified for DB2 Dataservers
2550
2566
  def set_binary_value
2551
- "BLOB('?')"
2567
+ #"BLOB('?')"
2568
+ "?"
2552
2569
  end
2553
2570
 
2554
2571
  # This method generates the default clob value specified for
@@ -105,12 +105,19 @@ elsif (RUBY_VERSION =~ /2.1./)
105
105
  elsif (RUBY_VERSION =~ /2.2./ )
106
106
  #Check if we are on 64-bit or 32-bit ruby and load binary accordingly
107
107
  machine_bits = ['ibm'].pack('p').size * 8
108
- if machine_bits == 64
109
- #require 'rb22x/x64/ibm_db.so'
108
+ if machine_bits == 64
110
109
  raise NotImplementedError, "ibm_db with Ruby 2.2 64-bit on Windows platform is not supported. Refer to README for more details"
111
110
  else
112
111
  require 'rb22x/i386/ibm_db.so'
113
112
  end
113
+ elsif (RUBY_VERSION =~ /2.3./ )
114
+ #Check if we are on 64-bit or 32-bit ruby and load binary accordingly
115
+ machine_bits = ['ibm'].pack('p').size * 8
116
+ if machine_bits == 64
117
+ raise NotImplementedError, "ibm_db with Ruby 2.2 64-bit on Windows platform is not supported. Refer to README for more details"
118
+ else
119
+ require 'rb23x/i386/ibm_db.so'
120
+ end
114
121
  else
115
122
  require 'rb18x/ibm_db.so'
116
123
  end
Binary file
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - IBM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: archive-zip
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.7.0
41
41
  description:
@@ -48,28 +48,29 @@ extra_rdoc_files:
48
48
  - MANIFEST
49
49
  files:
50
50
  - CHANGES
51
- - ext/extconf.rb
52
- - ext/ibm_db.c
51
+ - LICENSE
52
+ - MANIFEST
53
+ - ParameterizedQueries README
54
+ - README
53
55
  - ext/Makefile.nt32
54
56
  - ext/Makefile.nt32.191
57
+ - ext/extconf.rb
58
+ - ext/ibm_db.c
55
59
  - ext/ruby_ibm_db.h
56
60
  - ext/ruby_ibm_db_cli.c
57
61
  - ext/ruby_ibm_db_cli.h
58
62
  - init.rb
59
- - lib/active_record/connection_adapters/ibmdb_adapter.rb
63
+ - lib/IBM_DB.rb
60
64
  - lib/active_record/connection_adapters/ibm_db_adapter.rb
61
65
  - lib/active_record/connection_adapters/ibm_db_pstmt.rb
66
+ - lib/active_record/connection_adapters/ibmdb_adapter.rb
62
67
  - lib/active_record/vendor/db2-i5-zOS.yaml
63
- - lib/IBM_DB.rb
64
68
  - lib/mswin32/ibm_db.rb
65
69
  - lib/mswin32/rb19x/ibm_db.so
66
70
  - lib/mswin32/rb21x/i386/ibm_db.so
67
71
  - lib/mswin32/rb22x/i386/ibm_db.so
72
+ - lib/mswin32/rb23x/i386/ibm_db.so
68
73
  - lib/mswin32/rb2x/i386/ibm_db.so
69
- - LICENSE
70
- - MANIFEST
71
- - ParameterizedQueries README
72
- - README
73
74
  - test/active_record/connection_adapters/fake_adapter.rb
74
75
  - test/assets/example.log
75
76
  - test/assets/flowers.jpg
@@ -98,13 +99,13 @@ files:
98
99
  - test/cases/associations/nested_through_associations_test.rb
99
100
  - test/cases/associations/required_test.rb
100
101
  - test/cases/associations_test.rb
101
- - test/cases/attributes_test.rb
102
102
  - test/cases/attribute_decorators_test.rb
103
103
  - test/cases/attribute_methods/read_test.rb
104
104
  - test/cases/attribute_methods/serialization_test.rb
105
105
  - test/cases/attribute_methods_test.rb
106
106
  - test/cases/attribute_set_test.rb
107
107
  - test/cases/attribute_test.rb
108
+ - test/cases/attributes_test.rb
108
109
  - test/cases/autosave_association_test.rb
109
110
  - test/cases/base_test.rb
110
111
  - test/cases/batches_test.rb
@@ -141,8 +142,8 @@ files:
141
142
  - test/cases/explain_test.rb
142
143
  - test/cases/finder_respond_to_test.rb
143
144
  - test/cases/finder_test.rb
144
- - test/cases/fixtures_test.rb
145
145
  - test/cases/fixture_set/file_test.rb
146
+ - test/cases/fixtures_test.rb
146
147
  - test/cases/forbidden_attributes_protection_test.rb
147
148
  - test/cases/habtm_destroy_order_test.rb
148
149
  - test/cases/helper.rb
@@ -159,9 +160,9 @@ files:
159
160
  - test/cases/migration/change_schema_test - Copy.rb
160
161
  - test/cases/migration/change_schema_test.rb
161
162
  - test/cases/migration/change_table_test.rb
162
- - test/cases/migration/columns_test.rb
163
163
  - test/cases/migration/column_attributes_test.rb
164
164
  - test/cases/migration/column_positioning_test.rb
165
+ - test/cases/migration/columns_test.rb
165
166
  - test/cases/migration/command_recorder_test.rb
166
167
  - test/cases/migration/create_join_table_test.rb
167
168
  - test/cases/migration/foreign_key_test - Changed.rb
@@ -198,8 +199,8 @@ files:
198
199
  - test/cases/relation/where_chain_test.rb
199
200
  - test/cases/relation/where_test.rb
200
201
  - test/cases/relation/where_test2.rb
201
- - test/cases/relations_test.rb
202
202
  - test/cases/relation_test.rb
203
+ - test/cases/relations_test.rb
203
204
  - test/cases/reload_models_test.rb
204
205
  - test/cases/result_test.rb
205
206
  - test/cases/sanitize_test.rb
@@ -217,9 +218,9 @@ files:
217
218
  - test/cases/tasks/sqlite_rake_test.rb
218
219
  - test/cases/test_case.rb
219
220
  - test/cases/timestamp_test.rb
220
- - test/cases/transactions_test.rb
221
221
  - test/cases/transaction_callbacks_test.rb
222
222
  - test/cases/transaction_isolation_test.rb
223
+ - test/cases/transactions_test.rb
223
224
  - test/cases/type/decimal_test.rb
224
225
  - test/cases/type/integer_test.rb
225
226
  - test/cases/type/string_test.rb
@@ -250,16 +251,16 @@ files:
250
251
  - test/fixtures/all/developers.yml
251
252
  - test/fixtures/all/people.yml
252
253
  - test/fixtures/all/tasks.yml
253
- - test/fixtures/authors.yml
254
254
  - test/fixtures/author_addresses.yml
255
255
  - test/fixtures/author_favorites.yml
256
+ - test/fixtures/authors.yml
256
257
  - test/fixtures/binaries.yml
257
258
  - test/fixtures/books.yml
258
259
  - test/fixtures/bulbs.yml
259
260
  - test/fixtures/cars.yml
261
+ - test/fixtures/categories.yml
260
262
  - test/fixtures/categories/special_categories.yml
261
263
  - test/fixtures/categories/subsubdir/arbitrary_filename.yml
262
- - test/fixtures/categories.yml
263
264
  - test/fixtures/categories_ordered.yml
264
265
  - test/fixtures/categories_posts.yml
265
266
  - test/fixtures/categorizations.yml
@@ -274,8 +275,8 @@ files:
274
275
  - test/fixtures/dashboards.yml
275
276
  - test/fixtures/developers.yml
276
277
  - test/fixtures/developers_projects.yml
277
- - test/fixtures/dogs.yml
278
278
  - test/fixtures/dog_lovers.yml
279
+ - test/fixtures/dogs.yml
279
280
  - test/fixtures/doubloons.yml
280
281
  - test/fixtures/edges.yml
281
282
  - test/fixtures/entrants.yml
@@ -290,10 +291,10 @@ files:
290
291
  - test/fixtures/jobs.yml
291
292
  - test/fixtures/legacy_things.yml
292
293
  - test/fixtures/mateys.yml
293
- - test/fixtures/members.yml
294
- - test/fixtures/memberships.yml
295
294
  - test/fixtures/member_details.yml
296
295
  - test/fixtures/member_types.yml
296
+ - test/fixtures/members.yml
297
+ - test/fixtures/memberships.yml
297
298
  - test/fixtures/men.yml
298
299
  - test/fixtures/minimalistics.yml
299
300
  - test/fixtures/minivans.yml
@@ -336,10 +337,10 @@ files:
336
337
  - test/fixtures/tags.yml
337
338
  - test/fixtures/tasks.yml
338
339
  - test/fixtures/teapots.yml
339
- - test/fixtures/topics.yml
340
- - test/fixtures/toys.yml
341
340
  - test/fixtures/to_be_linked/accounts.yml
342
341
  - test/fixtures/to_be_linked/users.yml
342
+ - test/fixtures/topics.yml
343
+ - test/fixtures/toys.yml
343
344
  - test/fixtures/traffic_lights.yml
344
345
  - test/fixtures/treasures.yml
345
346
  - test/fixtures/uuid_children.yml
@@ -378,15 +379,15 @@ files:
378
379
  - test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb
379
380
  - test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb
380
381
  - test/migrations/version_check/20131219224947_migration_version_check.rb
382
+ - test/models/admin.rb
381
383
  - test/models/admin/account.rb
382
384
  - test/models/admin/randomly_named_c1.rb
383
385
  - test/models/admin/user.rb
384
- - test/models/admin.rb
385
386
  - test/models/aircraft.rb
386
387
  - test/models/arunit2_model.rb
387
388
  - test/models/author.rb
388
- - test/models/autoloadable/extra_firm.rb
389
389
  - test/models/auto_id.rb
390
+ - test/models/autoloadable/extra_firm.rb
390
391
  - test/models/binary.rb
391
392
  - test/models/bird.rb
392
393
  - test/models/book.rb
@@ -446,9 +447,9 @@ files:
446
447
  - test/models/man.rb
447
448
  - test/models/matey.rb
448
449
  - test/models/member.rb
449
- - test/models/membership.rb
450
450
  - test/models/member_detail.rb
451
451
  - test/models/member_type.rb
452
+ - test/models/membership.rb
452
453
  - test/models/minimalistic.rb
453
454
  - test/models/minivan.rb
454
455
  - test/models/mixed_case_monkey.rb
@@ -467,9 +468,9 @@ files:
467
468
  - test/models/price_estimate.rb
468
469
  - test/models/professor.rb
469
470
  - test/models/project.rb
471
+ - test/models/publisher.rb
470
472
  - test/models/publisher/article.rb
471
473
  - test/models/publisher/magazine.rb
472
- - test/models/publisher.rb
473
474
  - test/models/randomly_named_c1.rb
474
475
  - test/models/rating.rb
475
476
  - test/models/reader.rb
@@ -534,18 +535,18 @@ require_paths:
534
535
  - lib
535
536
  required_ruby_version: !ruby/object:Gem::Requirement
536
537
  requirements:
537
- - - '>='
538
+ - - ">="
538
539
  - !ruby/object:Gem::Version
539
540
  version: 2.0.0
540
541
  required_rubygems_version: !ruby/object:Gem::Requirement
541
542
  requirements:
542
- - - '>='
543
+ - - ">="
543
544
  - !ruby/object:Gem::Version
544
545
  version: '0'
545
546
  requirements:
546
547
  - ActiveRecord, at least 4.2.0
547
548
  rubyforge_project: rubyibm
548
- rubygems_version: 2.0.14.1
549
+ rubygems_version: 2.5.1
549
550
  signing_key:
550
551
  specification_version: 4
551
552
  summary: 'Rails Driver and Adapter for IBM Data Servers: {DB2 on Linux/Unix/Windows,