activerecord-oracle_enhanced-adapter 5.2.0.beta1 → 5.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +1 -1
- data/VERSION +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb +3 -3
- data/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb +16 -0
- data/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb +3 -3
- data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +1 -5
- data/lib/active_record/type/oracle_enhanced/national_character_text.rb +1 -1
- data/lib/active_record/type/oracle_enhanced/text.rb +1 -1
- data/spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb +7 -7
- data/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb +1 -0
- data/spec/active_record/oracle_enhanced/type/boolean_spec.rb +1 -0
- data/spec/active_record/oracle_enhanced/type/national_character_text_spec.rb +1 -1
- data/spec/active_record/oracle_enhanced/type/text_spec.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e19195d88863e1aee0c0455835a4b147089cf1d63f186313781c7a873971584
|
4
|
+
data.tar.gz: b00a09707c748ce35f909a8bd9130236384e8b93fd968f44db018500dfecd957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08d0dafa1bd9ab6babb68da03bdb4d72b0d5778c60065afbfaca1cd58b765705d6b3794343bae0d4d3c423f26206c776a54a20922aaa610d2f758af57e827729'
|
7
|
+
data.tar.gz: 0fe5601895d3c5bee38f624908a89c8bbd2b3717f63769abb9c5169536e1aacdbc9a6fea490b8a30a5ad6a02964063a7182dbbefd76375d9a40f561341ec287e
|
data/History.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
* Major changes and fixes
|
4
4
|
|
5
|
-
* Support Rails 5.2.0.beta1
|
5
|
+
* Support Rails 5.2.0.beta1
|
6
6
|
* Oracle enhanced adapter version follows Rails versioning [#1488]
|
7
7
|
* Handle `TIMESTAMP WITH TIMEZONE` separately from `TIMEZONE` [#1267]
|
8
8
|
* Support `timestamptz` and `timestampltz` for migrations #1285
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.2.0.
|
1
|
+
5.2.0.rc1
|
@@ -231,7 +231,7 @@ module ActiveRecord
|
|
231
231
|
default_clause = case clause
|
232
232
|
when "R_TABLE_CLAUSE"; "LOB(DATA) STORE AS (CACHE) "
|
233
233
|
when "I_INDEX_CLAUSE"; "COMPRESS 2 "
|
234
|
-
|
234
|
+
else ""
|
235
235
|
end
|
236
236
|
sql << "CTX_DDL.SET_ATTRIBUTE('#{storage_name}', '#{clause}', '#{default_clause}TABLESPACE #{tablespace}');\n"
|
237
237
|
end
|
@@ -248,7 +248,7 @@ module ActiveRecord
|
|
248
248
|
when true; "'YES'"
|
249
249
|
when false; "'NO'"
|
250
250
|
when nil; "NULL"
|
251
|
-
|
251
|
+
else value
|
252
252
|
end
|
253
253
|
sql << "CTX_DDL.SET_ATTRIBUTE('#{lexer_name}', '#{key}', #{plsql_value});\n"
|
254
254
|
end
|
@@ -265,7 +265,7 @@ module ActiveRecord
|
|
265
265
|
when true; "'YES'"
|
266
266
|
when false; "'NO'"
|
267
267
|
when nil; "NULL"
|
268
|
-
|
268
|
+
else value
|
269
269
|
end
|
270
270
|
sql << "CTX_DDL.SET_ATTRIBUTE('#{wordlist_name}', '#{key}', #{plsql_value});\n"
|
271
271
|
end
|
@@ -224,11 +224,27 @@ module ActiveRecord
|
|
224
224
|
|
225
225
|
# fallback to non bulk fixture insert
|
226
226
|
def insert_fixtures(fixtures, table_name)
|
227
|
+
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
228
|
+
`insert_fixtures` is deprecated and will be removed in the next version of Rails.
|
229
|
+
Consider using `insert_fixtures_set` for performance improvement.
|
230
|
+
MSG
|
227
231
|
fixtures.each do |fixture|
|
228
232
|
insert_fixture(fixture, table_name)
|
229
233
|
end
|
230
234
|
end
|
231
235
|
|
236
|
+
def insert_fixtures_set(fixture_set, tables_to_delete = [])
|
237
|
+
disable_referential_integrity do
|
238
|
+
transaction(requires_new: true) do
|
239
|
+
tables_to_delete.each { |table| delete "DELETE FROM #{quote_table_name(table)}", "Fixture Delete" }
|
240
|
+
|
241
|
+
fixture_set.each do |table_name, rows|
|
242
|
+
rows.each { |row| insert_fixture(row, table_name) }
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
232
248
|
# Oracle Database does not support this feature
|
233
249
|
# Refer https://community.oracle.com/ideas/13845 and consider to vote
|
234
250
|
# if you need this feature.
|
@@ -269,7 +269,7 @@ module ActiveRecord
|
|
269
269
|
[value.year, value.month, value.day, value.hour, value.min, value.sec, value.usec]
|
270
270
|
when OraDate
|
271
271
|
[value.year, value.month, value.day, value.hour, value.minute, value.second, 0]
|
272
|
-
|
272
|
+
else
|
273
273
|
[value.year, value.month, value.day, value.hour, value.min, value.sec, 0]
|
274
274
|
end
|
275
275
|
# code from Time.time_with_datetime_fallback
|
@@ -128,7 +128,7 @@ module ActiveRecord
|
|
128
128
|
row["index_name"],
|
129
129
|
row["uniqueness"] == "UNIQUE",
|
130
130
|
[],
|
131
|
-
|
131
|
+
{},
|
132
132
|
row["index_type"] == "DOMAIN" ? "#{row['ityp_owner']}.#{row['ityp_name']}" : nil,
|
133
133
|
row["parameters"],
|
134
134
|
statement_parameters,
|
@@ -290,7 +290,7 @@ module ActiveRecord
|
|
290
290
|
index_name = options[:name].to_s if options.key?(:name)
|
291
291
|
tablespace = tablespace_for(:index, options[:tablespace])
|
292
292
|
max_index_length = options.fetch(:internal, false) ? index_name_length : allowed_index_name_length
|
293
|
-
#TODO: This option is used for NOLOGGING, needs better argumetn name
|
293
|
+
# TODO: This option is used for NOLOGGING, needs better argumetn name
|
294
294
|
index_options = options[:options]
|
295
295
|
|
296
296
|
if index_name.to_s.length > max_index_length
|
@@ -308,7 +308,7 @@ module ActiveRecord
|
|
308
308
|
# Gives warning if index does not exist
|
309
309
|
def remove_index(table_name, options = {}) #:nodoc:
|
310
310
|
index_name = index_name_for_remove(table_name, options)
|
311
|
-
#TODO: It should execute only when index_type == "UNIQUE"
|
311
|
+
# TODO: It should execute only when index_type == "UNIQUE"
|
312
312
|
execute "ALTER TABLE #{quote_table_name(table_name)} DROP CONSTRAINT #{quote_column_name(index_name)}" rescue nil
|
313
313
|
execute "DROP INDEX #{quote_column_name(index_name)}"
|
314
314
|
end
|
@@ -646,11 +646,7 @@ module ActiveRecord
|
|
646
646
|
end
|
647
647
|
|
648
648
|
if OracleEnhancedAdapter.emulate_booleans
|
649
|
-
|
650
|
-
m.register_type %r(^VARCHAR2\(1\))i, Type::OracleEnhanced::Boolean.new
|
651
|
-
else
|
652
|
-
m.register_type %r(^NUMBER\(1\))i, Type::Boolean.new
|
653
|
-
end
|
649
|
+
m.register_type %r(^NUMBER\(1\))i, Type::Boolean.new
|
654
650
|
end
|
655
651
|
end
|
656
652
|
|
@@ -7,7 +7,7 @@ module ActiveRecord
|
|
7
7
|
module OracleEnhanced
|
8
8
|
class Text < ActiveRecord::Type::Text # :nodoc:
|
9
9
|
def changed_in_place?(raw_old_value, new_value)
|
10
|
-
#TODO: Needs to find a way not to cast here.
|
10
|
+
# TODO: Needs to find a way not to cast here.
|
11
11
|
raw_old_value = cast(raw_old_value)
|
12
12
|
super
|
13
13
|
end
|
@@ -394,15 +394,15 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
394
394
|
@conn.create_table :full_drop_test_temp, temporary: true do |t|
|
395
395
|
t.string :foo
|
396
396
|
end
|
397
|
-
#view
|
397
|
+
# view
|
398
398
|
@conn.execute <<-SQL
|
399
399
|
create or replace view full_drop_test_view (foo) as select id as "foo" from full_drop_test
|
400
400
|
SQL
|
401
|
-
#materialized view
|
401
|
+
# materialized view
|
402
402
|
@conn.execute <<-SQL
|
403
403
|
create materialized view full_drop_test_mview (foo) as select id as "foo" from full_drop_test
|
404
404
|
SQL
|
405
|
-
#package
|
405
|
+
# package
|
406
406
|
@conn.execute <<-SQL
|
407
407
|
create or replace package full_drop_test_package as
|
408
408
|
function test_func return varchar2;
|
@@ -416,7 +416,7 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
416
416
|
end test_func;
|
417
417
|
end test_package;
|
418
418
|
SQL
|
419
|
-
#function
|
419
|
+
# function
|
420
420
|
@conn.execute <<-SQL
|
421
421
|
create or replace function full_drop_test_function
|
422
422
|
return varchar2
|
@@ -426,7 +426,7 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
426
426
|
return('foo');
|
427
427
|
end;
|
428
428
|
SQL
|
429
|
-
#procedure
|
429
|
+
# procedure
|
430
430
|
@conn.execute <<-SQL
|
431
431
|
create or replace procedure full_drop_test_procedure
|
432
432
|
begin
|
@@ -436,11 +436,11 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
436
436
|
dbms_output.put_line('foo');
|
437
437
|
end;
|
438
438
|
SQL
|
439
|
-
#synonym
|
439
|
+
# synonym
|
440
440
|
@conn.execute <<-SQL
|
441
441
|
create or replace synonym full_drop_test_synonym for full_drop_test
|
442
442
|
SQL
|
443
|
-
#type
|
443
|
+
# type
|
444
444
|
@conn.execute <<-SQL
|
445
445
|
create or replace type full_drop_test_type as table of number
|
446
446
|
SQL
|
@@ -573,6 +573,7 @@ describe "OracleEnhancedAdapter" do
|
|
573
573
|
end
|
574
574
|
|
575
575
|
it "Raises Deadlocked when a deadlock is encountered" do
|
576
|
+
skip "Skip temporary due to #1599" if ActiveRecord::Base.connection.supports_fetch_first_n_rows_and_offset?
|
576
577
|
expect {
|
577
578
|
barrier = Concurrent::CyclicBarrier.new(2)
|
578
579
|
|
@@ -97,7 +97,7 @@ describe "OracleEnhancedAdapter handling of NCLOB columns" do
|
|
97
97
|
@employee.comments = {}
|
98
98
|
expect(@employee.save).to eq(true)
|
99
99
|
@employee.reload
|
100
|
-
#should not set readonly
|
100
|
+
# should not set readonly
|
101
101
|
expect(@employee.comments).to be_nil
|
102
102
|
end
|
103
103
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-oracle_enhanced-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.0.
|
4
|
+
version: 5.2.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raimonds Simanovskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.2.0.
|
19
|
+
version: 5.2.0.rc
|
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
|
-
version: 5.2.0.
|
26
|
+
version: 5.2.0.rc
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-plsql
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,36 +134,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: 1.8.11
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.7.
|
137
|
+
rubygems_version: 2.7.3
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Oracle enhanced adapter for ActiveRecord
|
141
141
|
test_files:
|
142
|
-
- spec/
|
143
|
-
- spec/
|
144
|
-
- spec/
|
145
|
-
- spec/
|
146
|
-
- spec/
|
142
|
+
- spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
|
143
|
+
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
144
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
|
145
|
+
- spec/active_record/connection_adapters/oracle_enhanced/database_tasks_spec.rb
|
146
|
+
- spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
|
147
|
+
- spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
|
148
|
+
- spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
|
149
|
+
- spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
|
150
|
+
- spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb
|
151
|
+
- spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb
|
152
|
+
- spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
|
153
|
+
- spec/active_record/connection_adapters/oracle_enhanced/dbms_output_spec.rb
|
147
154
|
- spec/active_record/oracle_enhanced/type/integer_spec.rb
|
148
155
|
- spec/active_record/oracle_enhanced/type/national_character_text_spec.rb
|
149
156
|
- spec/active_record/oracle_enhanced/type/timestamp_spec.rb
|
157
|
+
- spec/active_record/oracle_enhanced/type/binary_spec.rb
|
158
|
+
- spec/active_record/oracle_enhanced/type/national_character_string_spec.rb
|
150
159
|
- spec/active_record/oracle_enhanced/type/raw_spec.rb
|
160
|
+
- spec/active_record/oracle_enhanced/type/float_spec.rb
|
151
161
|
- spec/active_record/oracle_enhanced/type/dirty_spec.rb
|
152
162
|
- spec/active_record/oracle_enhanced/type/json_spec.rb
|
153
|
-
- spec/active_record/oracle_enhanced/type/float_spec.rb
|
154
|
-
- spec/active_record/oracle_enhanced/type/boolean_spec.rb
|
155
|
-
- spec/active_record/oracle_enhanced/type/national_character_string_spec.rb
|
156
|
-
- spec/active_record/oracle_enhanced/type/binary_spec.rb
|
157
163
|
- spec/active_record/oracle_enhanced/type/text_spec.rb
|
158
|
-
- spec/active_record/
|
159
|
-
- spec/
|
160
|
-
- spec/
|
161
|
-
- spec/
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
|
165
|
-
- spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
|
166
|
-
- spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
|
167
|
-
- spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
|
168
|
-
- spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
|
169
|
-
- spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
|
164
|
+
- spec/active_record/oracle_enhanced/type/boolean_spec.rb
|
165
|
+
- spec/spec_config.yaml.template
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
- spec/support/create_oracle_enhanced_users.sql
|
168
|
+
- spec/support/alter_system_user_password.sql
|
169
|
+
- spec/support/alter_system_set_open_cursors.sql
|