activerecord-rdb-adapter 0.9.6.beta1 → 0.9.6.beta2

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
  SHA256:
3
- metadata.gz: 1c2f1b87f8c904bda69802b81d12822766bcfe2c1ebce119c5bcec8bb27f9c09
4
- data.tar.gz: ce90448bb3f30f04ba1815cb421e3741173c0e4df4213bb2472f05e887444280
3
+ metadata.gz: 621e796c470b4ec555c416badf844e2ff0261ec14e445d1155557a7fc3f063fd
4
+ data.tar.gz: 71b340848583c2b025352f2218fc695cf450f03d2ff50e0a6c32d88c25885f58
5
5
  SHA512:
6
- metadata.gz: b7d723263d472773561d9e2477fa15c84607ceb9a1f16167462e9b5a311e148cd9b558e7eeeb5c56bfaabc2e7850911ea200ca1242823f10f94770e43d9bb376
7
- data.tar.gz: 11aeb9acb22cdd1480ba996c609e0fa5c99bf43a5104d073f8b98d38c47b72736c1b9913dce7549d26f6f186580f6a76d8ac94f0b87e003699cccc4a330c3260
6
+ metadata.gz: 55459079dc2d3aa0c3c236750772f73885abe083743cd029bf4136ab4054f9c7b22ab18376f85858b8a704767d9eea93bfc2b147a3ef65d7d3912b4fae1b6b3f
7
+ data.tar.gz: fc0ac38a0c8f9f287e282e34b6016f66d191e3aead669f53f35f3179f3a4a71d0d198e73b88f401a862163368fa04d30e873c7a28fe4f36c2072763757d77785
data/fb.c CHANGED
@@ -2168,8 +2168,15 @@ static VALUE cursor_execute(int argc, VALUE* argv, VALUE self)
2168
2168
  VALUE result;
2169
2169
  int state;
2170
2170
 
2171
- fb_connection_transaction_start(fb_connection, Qnil);
2172
-
2171
+ ISC_LONG statement_type = 0;
2172
+ if (fb_connection->readonly_selects) {
2173
+ statement_type = fb_statement_type(fb_connection, fb_cursor,args);
2174
+ }
2175
+ if (statement_type == isc_info_sql_stmt_select) {
2176
+ fb_connection_transaction_start(fb_connection, rb_ro_trans_p());
2177
+ } else {
2178
+ fb_connection_transaction_start(fb_connection, Qnil);
2179
+ }
2173
2180
  fb_cursor->auto_transact = fb_connection->transact;
2174
2181
 
2175
2182
  result = rb_protect(cursor_execute2, args, &state);
@@ -378,7 +378,7 @@ module ActiveRecord
378
378
  end
379
379
 
380
380
  def string_to_sql(limit)
381
- if limit && limit > 0 && limit < 255
381
+ if limit && limit > 0
382
382
  "VARCHAR(#{limit})"
383
383
  else
384
384
  'VARCHAR(255)'
@@ -27,7 +27,7 @@ module ActiveRecord
27
27
  # config[:charset] = config[:charset].gsub(/-/, '') if config[:charset]
28
28
  # config[:encoding] = config[:encoding].gsub(/-/, '') if config[:encoding]
29
29
  config[:page_size] = 8192 unless config[:page_size]
30
- # config[:readonly_selects] = true unless config[:readonly_selects].present?
30
+ config[:readonly_selects] = true unless config[:readonly_selects].present?
31
31
  config
32
32
  end
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-rdb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6.beta1
4
+ version: 0.9.6.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Lobanov (RedSoft)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-15 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: 1.3.1
71
71
  requirements:
72
72
  - Firebird library fb
73
- rubygems_version: 3.0.3
73
+ rubygems_version: 3.1.6
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: ActiveRecord RedDatabase 3+ and Firebird 3+ Adapter