activerecord-oracle_enhanced-adapter 5.2.8 → 6.0.0.beta1
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 +4 -4
- data/History.md +79 -13
- data/README.md +1 -7
- data/VERSION +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/connection.rb +10 -13
- data/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb +7 -7
- data/lib/active_record/connection_adapters/oracle_enhanced/database_limits.rb +4 -0
- data/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb +7 -18
- data/lib/active_record/connection_adapters/oracle_enhanced/database_tasks.rb +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb +17 -4
- data/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb +32 -32
- data/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb +17 -27
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_creation.rb +4 -4
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb +13 -3
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb +1 -13
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb +55 -71
- data/lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb +27 -17
- data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +87 -61
- data/lib/active_record/type/oracle_enhanced/character_string.rb +36 -0
- data/spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb +0 -2
- data/spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb +25 -50
- data/spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb +5 -13
- data/spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb +0 -2
- data/spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb +0 -15
- data/spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb +1 -31
- data/spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb +71 -253
- data/spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb +2 -3
- data/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb +81 -81
- data/spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb +0 -1
- data/spec/active_record/oracle_enhanced/type/boolean_spec.rb +0 -2
- data/spec/active_record/oracle_enhanced/type/character_string_spec.rb +43 -0
- data/spec/active_record/oracle_enhanced/type/decimal_spec.rb +56 -0
- data/spec/active_record/oracle_enhanced/type/dirty_spec.rb +1 -1
- data/spec/active_record/oracle_enhanced/type/json_spec.rb +0 -1
- data/spec/active_record/oracle_enhanced/type/national_character_string_spec.rb +1 -2
- data/spec/active_record/oracle_enhanced/type/timestamp_spec.rb +0 -2
- data/spec/spec_helper.rb +2 -0
- metadata +27 -23
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_statements_ext.rb +0 -28
@@ -122,7 +122,7 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
122
122
|
it "should dump views" do
|
123
123
|
@conn.execute "create or replace VIEW test_posts_view_z as select * from test_posts"
|
124
124
|
@conn.execute "create or replace VIEW test_posts_view_a as select * from test_posts_view_z"
|
125
|
-
dump = ActiveRecord::Base.connection.
|
125
|
+
dump = ActiveRecord::Base.connection.structure_dump.gsub(/\n|\s+/, " ")
|
126
126
|
expect(dump).to match(/CREATE OR REPLACE FORCE VIEW TEST_POSTS_VIEW_A.*CREATE OR REPLACE FORCE VIEW TEST_POSTS_VIEW_Z/)
|
127
127
|
end
|
128
128
|
|
@@ -242,7 +242,6 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
242
242
|
dump = ActiveRecord::Base.connection.structure_dump
|
243
243
|
expect(dump).to match(/#{comment_sql}/)
|
244
244
|
end
|
245
|
-
|
246
245
|
end
|
247
246
|
describe "temporary tables" do
|
248
247
|
after(:all) do
|
@@ -350,7 +349,7 @@ describe "OracleEnhancedAdapter structure dump" do
|
|
350
349
|
it "should dump schema migrations using multi inserts" do
|
351
350
|
skip "Not supported in this database version" unless ActiveRecord::Base.connection.supports_multi_insert?
|
352
351
|
|
353
|
-
expect(dump).to eq
|
352
|
+
expect(dump).to eq <<~SQL
|
354
353
|
INSERT ALL
|
355
354
|
INTO "SCHEMA_MIGRATIONS" (version) VALUES ('20160101000000')
|
356
355
|
INTO "SCHEMA_MIGRATIONS" (version) VALUES ('20160102000000')
|
@@ -59,7 +59,6 @@ describe "OracleEnhancedAdapter" do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
describe "without column caching" do
|
62
|
-
|
63
62
|
it "should identify virtual columns as such" do
|
64
63
|
skip "Not supported in this database version" unless @conn.supports_virtual_columns?
|
65
64
|
te = TestEmployee.connection.columns("test_employees").detect(&:virtual?)
|
@@ -108,56 +107,6 @@ describe "OracleEnhancedAdapter" do
|
|
108
107
|
end
|
109
108
|
end
|
110
109
|
|
111
|
-
describe "access table over database link" do
|
112
|
-
before(:all) do
|
113
|
-
@conn = ActiveRecord::Base.connection
|
114
|
-
@db_link = "db_link"
|
115
|
-
@sys_conn = ActiveRecord::Base.oracle_enhanced_connection(SYSTEM_CONNECTION_PARAMS)
|
116
|
-
@sys_conn.drop_table :test_posts, if_exists: true
|
117
|
-
@sys_conn.create_table :test_posts do |t|
|
118
|
-
t.string :title
|
119
|
-
# cannot update LOBs over database link
|
120
|
-
t.string :body
|
121
|
-
t.timestamps null: true
|
122
|
-
end
|
123
|
-
@db_link_username = SYSTEM_CONNECTION_PARAMS[:username]
|
124
|
-
@db_link_password = SYSTEM_CONNECTION_PARAMS[:password]
|
125
|
-
@db_link_database = SYSTEM_CONNECTION_PARAMS[:database]
|
126
|
-
@conn.execute "DROP DATABASE LINK #{@db_link}" rescue nil
|
127
|
-
@conn.execute "CREATE DATABASE LINK #{@db_link} CONNECT TO #{@db_link_username} IDENTIFIED BY \"#{@db_link_password}\" USING '#{@db_link_database}'"
|
128
|
-
@conn.execute "CREATE OR REPLACE SYNONYM test_posts FOR test_posts@#{@db_link}"
|
129
|
-
@conn.execute "CREATE OR REPLACE SYNONYM test_posts_seq FOR test_posts_seq@#{@db_link}"
|
130
|
-
class ::TestPost < ActiveRecord::Base
|
131
|
-
end
|
132
|
-
TestPost.table_name = "test_posts"
|
133
|
-
end
|
134
|
-
|
135
|
-
after(:all) do
|
136
|
-
@conn.execute "DROP SYNONYM test_posts"
|
137
|
-
@conn.execute "DROP SYNONYM test_posts_seq"
|
138
|
-
@conn.execute "DROP DATABASE LINK #{@db_link}" rescue nil
|
139
|
-
@sys_conn.drop_table :test_posts, if_exists: true
|
140
|
-
Object.send(:remove_const, "TestPost") rescue nil
|
141
|
-
@conn.clear_table_columns_cache(:test_posts)
|
142
|
-
ActiveRecord::Base.clear_cache!
|
143
|
-
end
|
144
|
-
|
145
|
-
it "should verify database link" do
|
146
|
-
@conn.select_value("select * from dual@#{@db_link}") == "X"
|
147
|
-
end
|
148
|
-
|
149
|
-
it "should get column names" do
|
150
|
-
expect(TestPost.column_names).to eq(["id", "title", "body", "created_at", "updated_at"])
|
151
|
-
end
|
152
|
-
|
153
|
-
it "should create record" do
|
154
|
-
p = TestPost.create(title: "Title", body: "Body")
|
155
|
-
expect(p.id).not_to be_nil
|
156
|
-
expect(TestPost.find(p.id)).not_to be_nil
|
157
|
-
end
|
158
|
-
|
159
|
-
end
|
160
|
-
|
161
110
|
describe "session information" do
|
162
111
|
before(:all) do
|
163
112
|
@conn = ActiveRecord::Base.connection
|
@@ -242,7 +191,6 @@ describe "OracleEnhancedAdapter" do
|
|
242
191
|
posts = TestPost.includes(:test_comments).to_a
|
243
192
|
expect(posts.size).to eq(@ids.size)
|
244
193
|
end
|
245
|
-
|
246
194
|
end
|
247
195
|
|
248
196
|
describe "with statement pool" do
|
@@ -343,12 +291,11 @@ describe "OracleEnhancedAdapter" do
|
|
343
291
|
@employee = Class.new(ActiveRecord::Base) do
|
344
292
|
self.table_name = :test_employees
|
345
293
|
end
|
346
|
-
|
347
|
-
@employee.create!(sort_order:
|
348
|
-
@employee.create!(sort_order:
|
349
|
-
@employee.create!(sort_order:
|
350
|
-
@employee.create!(sort_order:
|
351
|
-
@employee.create!(sort_order: i += 1, first_name: "Natasha", last_name: "Romanova")
|
294
|
+
@employee.create!(sort_order: 1, first_name: "Peter", last_name: "Parker")
|
295
|
+
@employee.create!(sort_order: 2, first_name: "Tony", last_name: "Stark")
|
296
|
+
@employee.create!(sort_order: 3, first_name: "Steven", last_name: "Rogers")
|
297
|
+
@employee.create!(sort_order: 4, first_name: "Bruce", last_name: "Banner")
|
298
|
+
@employee.create!(sort_order: 5, first_name: "Natasha", last_name: "Romanova")
|
352
299
|
end
|
353
300
|
|
354
301
|
after(:all) do
|
@@ -532,43 +479,32 @@ describe "OracleEnhancedAdapter" do
|
|
532
479
|
end
|
533
480
|
|
534
481
|
it "should return array from indexes with bind usage" do
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
it "should not have primary key trigger with bind usage" do
|
541
|
-
expect(@conn.has_primary_key_trigger?("TEST_POSTS")).to eq false
|
542
|
-
expect(@logger.logged(:debug).last).to match(/:owner/)
|
543
|
-
expect(@logger.logged(:debug).last).to match(/:table_name/)
|
544
|
-
expect(@logger.logged(:debug).last).to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["trigger_name", "TEST_POSTS_PKT"\], \["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
545
|
-
end
|
482
|
+
expect(@conn.indexes("TEST_POSTS").class).to eq Array
|
483
|
+
expect(@logger.logged(:debug).last).to match(/:table_name/)
|
484
|
+
expect(@logger.logged(:debug).last).to match(/\["table_name", "TEST_POSTS"\]/)
|
485
|
+
end
|
546
486
|
|
547
487
|
it "should return content from columns without bind usage" do
|
548
488
|
expect(@conn.columns("TEST_POSTS").length).to be > 0
|
549
|
-
expect(@logger.logged(:debug).last).not_to match(/:owner/)
|
550
489
|
expect(@logger.logged(:debug).last).not_to match(/:table_name/)
|
551
|
-
expect(@logger.logged(:debug).last).not_to match(/\[
|
490
|
+
expect(@logger.logged(:debug).last).not_to match(/\["table_name", "TEST_POSTS"\]/)
|
552
491
|
end
|
553
492
|
|
554
493
|
it "should return pk and sequence from pk_and_sequence_for without bind usage" do
|
555
494
|
expect(@conn.pk_and_sequence_for("TEST_POSTS").length).to eq 2
|
556
|
-
expect(@logger.logged(:debug).last).not_to match(
|
557
|
-
expect(@logger.logged(:debug).last).not_to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
495
|
+
expect(@logger.logged(:debug).last).not_to match(/\["table_name", "TEST_POSTS"\]/)
|
558
496
|
end
|
559
497
|
|
560
498
|
it "should return pk from primary_keys with bind usage" do
|
561
499
|
expect(@conn.primary_keys("TEST_POSTS")).to eq ["id"]
|
562
|
-
expect(@logger.logged(:debug).last).to match(
|
563
|
-
expect(@logger.logged(:debug).last).to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
500
|
+
expect(@logger.logged(:debug).last).to match(/\["table_name", "TEST_POSTS"\]/)
|
564
501
|
end
|
565
502
|
|
566
503
|
it "should return false from temporary_table? with bind usage" do
|
567
504
|
expect(@conn.temporary_table?("TEST_POSTS")).to eq false
|
568
505
|
expect(@logger.logged(:debug).last).to match(/:table_name/)
|
569
|
-
expect(@logger.logged(:debug).last).to match(/\[
|
506
|
+
expect(@logger.logged(:debug).last).to match(/\["table_name", "TEST_POSTS"\]/)
|
570
507
|
end
|
571
|
-
|
572
508
|
end
|
573
509
|
|
574
510
|
describe "Transaction" do
|
@@ -580,7 +516,7 @@ describe "OracleEnhancedAdapter" do
|
|
580
516
|
end
|
581
517
|
class ::TestPost < ActiveRecord::Base
|
582
518
|
end
|
583
|
-
Thread.report_on_exception, @original_report_on_exception = false, Thread.report_on_exception
|
519
|
+
Thread.report_on_exception, @original_report_on_exception = false, Thread.report_on_exception
|
584
520
|
end
|
585
521
|
|
586
522
|
it "Raises Deadlocked when a deadlock is encountered" do
|
@@ -595,7 +531,7 @@ describe "OracleEnhancedAdapter" do
|
|
595
531
|
TestPost.transaction do
|
596
532
|
t1.lock!
|
597
533
|
barrier.wait
|
598
|
-
t2.
|
534
|
+
t2.update(title: "one")
|
599
535
|
end
|
600
536
|
end
|
601
537
|
|
@@ -603,7 +539,7 @@ describe "OracleEnhancedAdapter" do
|
|
603
539
|
TestPost.transaction do
|
604
540
|
t2.lock!
|
605
541
|
barrier.wait
|
606
|
-
t1.
|
542
|
+
t1.update(title: "two")
|
607
543
|
end
|
608
544
|
ensure
|
609
545
|
thread.join
|
@@ -617,7 +553,71 @@ describe "OracleEnhancedAdapter" do
|
|
617
553
|
end
|
618
554
|
Object.send(:remove_const, "TestPost") rescue nil
|
619
555
|
ActiveRecord::Base.clear_cache!
|
620
|
-
Thread.report_on_exception = @original_report_on_exception
|
556
|
+
Thread.report_on_exception = @original_report_on_exception
|
557
|
+
end
|
558
|
+
end
|
559
|
+
|
560
|
+
describe "Sequence" do
|
561
|
+
before(:all) do
|
562
|
+
ActiveRecord::Base.establish_connection(CONNECTION_PARAMS)
|
563
|
+
@conn = ActiveRecord::Base.connection
|
564
|
+
schema_define do
|
565
|
+
create_table :table_with_name_thats_just_ok,
|
566
|
+
sequence_name: "suitably_short_seq", force: true do |t|
|
567
|
+
t.column :foo, :string, null: false
|
568
|
+
end
|
569
|
+
end
|
570
|
+
end
|
571
|
+
after(:all) do
|
572
|
+
schema_define do
|
573
|
+
drop_table :table_with_name_thats_just_ok,
|
574
|
+
sequence_name: "suitably_short_seq" rescue nil
|
575
|
+
end
|
576
|
+
end
|
577
|
+
it "should create table with custom sequence name" do
|
578
|
+
expect(@conn.select_value("select suitably_short_seq.nextval from dual")).to eq(1)
|
579
|
+
end
|
580
|
+
end
|
581
|
+
|
582
|
+
describe "Hints" do
|
583
|
+
before(:all) do
|
584
|
+
ActiveRecord::Base.establish_connection(CONNECTION_PARAMS)
|
585
|
+
@conn = ActiveRecord::Base.connection
|
586
|
+
schema_define do
|
587
|
+
drop_table :test_posts, if_exists: true
|
588
|
+
create_table :test_posts
|
589
|
+
end
|
590
|
+
class ::TestPost < ActiveRecord::Base
|
591
|
+
end
|
592
|
+
end
|
593
|
+
|
594
|
+
before(:each) do
|
595
|
+
@conn.clear_cache!
|
596
|
+
set_logger
|
597
|
+
end
|
598
|
+
|
599
|
+
after(:each) do
|
600
|
+
clear_logger
|
601
|
+
end
|
602
|
+
|
603
|
+
after(:all) do
|
604
|
+
schema_define do
|
605
|
+
drop_table :test_posts
|
606
|
+
end
|
607
|
+
Object.send(:remove_const, "TestPost")
|
608
|
+
ActiveRecord::Base.clear_cache!
|
609
|
+
end
|
610
|
+
|
611
|
+
it "should explain considers hints" do
|
612
|
+
post = TestPost.optimizer_hints("FULL (\"TEST_POSTS\")")
|
613
|
+
post = post.where(id: 1)
|
614
|
+
expect(post.explain).to include("| TABLE ACCESS FULL| TEST_POSTS |")
|
615
|
+
end
|
616
|
+
|
617
|
+
it "should explain considers hints with /*+ */ " do
|
618
|
+
post = TestPost.optimizer_hints("/*+ FULL (\"TEST_POSTS\") */")
|
619
|
+
post = post.where(id: 1)
|
620
|
+
expect(post.explain).to include("| TABLE ACCESS FULL| TEST_POSTS |")
|
621
621
|
end
|
622
622
|
end
|
623
623
|
end
|
@@ -165,9 +165,7 @@ describe "OracleEnhancedAdapter boolean type detection based on string column ty
|
|
165
165
|
create_employee3
|
166
166
|
expect(@employee3.active_flag.class).to eq(String)
|
167
167
|
end
|
168
|
-
|
169
168
|
end
|
170
|
-
|
171
169
|
end
|
172
170
|
|
173
171
|
describe "OracleEnhancedAdapter boolean support when emulate_booleans_from_strings = true" do
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe "OracleEnhancedAdapter processing CHAR column" do
|
4
|
+
before(:all) do
|
5
|
+
ActiveRecord::Base.establish_connection(CONNECTION_PARAMS)
|
6
|
+
@conn = ActiveRecord::Base.connection
|
7
|
+
@conn.execute <<-SQL
|
8
|
+
CREATE TABLE test_items (
|
9
|
+
id NUMBER(6,0) PRIMARY KEY,
|
10
|
+
padded CHAR(10)
|
11
|
+
)
|
12
|
+
SQL
|
13
|
+
@conn.execute "CREATE SEQUENCE test_items_seq"
|
14
|
+
end
|
15
|
+
|
16
|
+
after(:all) do
|
17
|
+
@conn.execute "DROP TABLE test_items"
|
18
|
+
@conn.execute "DROP SEQUENCE test_items_seq"
|
19
|
+
end
|
20
|
+
|
21
|
+
before(:each) do
|
22
|
+
class ::TestItem < ActiveRecord::Base
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
after(:each) do
|
27
|
+
Object.send(:remove_const, "TestItem")
|
28
|
+
ActiveRecord::Base.clear_cache!
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should create and find record" do
|
32
|
+
str = "ABC"
|
33
|
+
TestItem.create!
|
34
|
+
item = TestItem.first
|
35
|
+
item.padded = str
|
36
|
+
item.save
|
37
|
+
|
38
|
+
expect(TestItem.where(padded: item.padded).count).to eq(1)
|
39
|
+
|
40
|
+
item_reloaded = TestItem.first
|
41
|
+
expect(item_reloaded.padded).to eq(str)
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe "OracleEnhancedAdapter handling of DECIMAL columns" do
|
4
|
+
include SchemaSpecHelper
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
ActiveRecord::Base.establish_connection(CONNECTION_PARAMS)
|
8
|
+
@conn = ActiveRecord::Base.connection
|
9
|
+
schema_define do
|
10
|
+
create_table :test2_employees, force: true do |t|
|
11
|
+
t.string :first_name, limit: 20
|
12
|
+
t.string :last_name, limit: 25
|
13
|
+
t.string :email, limit: 25
|
14
|
+
t.string :phone_number, limit: 25
|
15
|
+
t.date :hire_date
|
16
|
+
t.integer :job_id
|
17
|
+
t.integer :salary
|
18
|
+
t.decimal :commission_pct, scale: 2, precision: 2
|
19
|
+
t.decimal :hourly_rate
|
20
|
+
t.integer :manager_id, limit: 6
|
21
|
+
t.integer :is_manager, limit: 1
|
22
|
+
t.decimal :department_id, scale: 0, precision: 4
|
23
|
+
t.timestamps
|
24
|
+
end
|
25
|
+
end
|
26
|
+
class ::Test2Employee < ActiveRecord::Base
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
after(:all) do
|
31
|
+
Object.send(:remove_const, "Test2Employee")
|
32
|
+
@conn.drop_table :test2_employees, if_exists: true
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should set DECIMAL column type as decimal" do
|
36
|
+
columns = @conn.columns("test2_employees")
|
37
|
+
column = columns.detect { |c| c.name == "hourly_rate" }
|
38
|
+
expect(column.type).to eq(:decimal)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should DECIMAL column type returns an exact value" do
|
42
|
+
employee = Test2Employee.create(hourly_rate: 4.40125)
|
43
|
+
|
44
|
+
employee.reload
|
45
|
+
|
46
|
+
expect(employee.hourly_rate).to eq(4.40125)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should DECIMAL column type rounds if scale is specified and value exceeds scale" do
|
50
|
+
employee = Test2Employee.create(commission_pct: 0.1575)
|
51
|
+
|
52
|
+
employee.reload
|
53
|
+
|
54
|
+
expect(employee.commission_pct).to eq(0.16)
|
55
|
+
end
|
56
|
+
end
|
@@ -123,7 +123,7 @@ describe "OracleEnhancedAdapter dirty object tracking" do
|
|
123
123
|
|
124
124
|
oci_conn = @conn.instance_variable_get("@connection")
|
125
125
|
class << oci_conn
|
126
|
-
|
126
|
+
def write_lob(lob, value, is_binary = false); raise "don't do this'"; end
|
127
127
|
end
|
128
128
|
expect { @employee.save! }.not_to raise_error
|
129
129
|
class << oci_conn
|
@@ -48,8 +48,7 @@ describe "OracleEnhancedAdapter quoting of NCHAR and NVARCHAR2 columns" do
|
|
48
48
|
nchar_column: nchar_data,
|
49
49
|
nvarchar2_column: nchar_data
|
50
50
|
).reload
|
51
|
-
expect(item.nchar_column).to eq(nchar_data
|
51
|
+
expect(item.nchar_column).to eq(nchar_data)
|
52
52
|
expect(item.nvarchar2_column).to eq(nchar_data)
|
53
53
|
end
|
54
|
-
|
55
54
|
end
|
data/spec/spec_helper.rb
CHANGED
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:
|
4
|
+
version: 6.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raimonds Simanovskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-18 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:
|
19
|
+
version: 6.0.0.beta
|
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:
|
26
|
+
version: 6.0.0.beta
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-plsql
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,12 +70,12 @@ files:
|
|
70
70
|
- lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb
|
71
71
|
- lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb
|
72
72
|
- lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb
|
73
|
-
- lib/active_record/connection_adapters/oracle_enhanced/schema_statements_ext.rb
|
74
73
|
- lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb
|
75
74
|
- lib/active_record/connection_adapters/oracle_enhanced/type_metadata.rb
|
76
75
|
- lib/active_record/connection_adapters/oracle_enhanced/version.rb
|
77
76
|
- lib/active_record/connection_adapters/oracle_enhanced_adapter.rb
|
78
77
|
- lib/active_record/type/oracle_enhanced/boolean.rb
|
78
|
+
- lib/active_record/type/oracle_enhanced/character_string.rb
|
79
79
|
- lib/active_record/type/oracle_enhanced/integer.rb
|
80
80
|
- lib/active_record/type/oracle_enhanced/json.rb
|
81
81
|
- lib/active_record/type/oracle_enhanced/national_character_string.rb
|
@@ -100,6 +100,8 @@ files:
|
|
100
100
|
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
101
101
|
- spec/active_record/oracle_enhanced/type/binary_spec.rb
|
102
102
|
- spec/active_record/oracle_enhanced/type/boolean_spec.rb
|
103
|
+
- spec/active_record/oracle_enhanced/type/character_string_spec.rb
|
104
|
+
- spec/active_record/oracle_enhanced/type/decimal_spec.rb
|
103
105
|
- spec/active_record/oracle_enhanced/type/dirty_spec.rb
|
104
106
|
- spec/active_record/oracle_enhanced/type/float_spec.rb
|
105
107
|
- spec/active_record/oracle_enhanced/type/integer_spec.rb
|
@@ -126,43 +128,45 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
128
|
requirements:
|
127
129
|
- - ">="
|
128
130
|
- !ruby/object:Gem::Version
|
129
|
-
version: 2.
|
131
|
+
version: 2.5.0
|
130
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
133
|
requirements:
|
132
134
|
- - ">="
|
133
135
|
- !ruby/object:Gem::Version
|
134
136
|
version: 1.8.11
|
135
137
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
138
|
+
rubygems_version: 3.0.3
|
137
139
|
signing_key:
|
138
140
|
specification_version: 4
|
139
141
|
summary: Oracle enhanced adapter for ActiveRecord
|
140
142
|
test_files:
|
141
|
-
- spec/
|
143
|
+
- spec/active_record/oracle_enhanced/type/character_string_spec.rb
|
144
|
+
- spec/active_record/oracle_enhanced/type/text_spec.rb
|
145
|
+
- spec/active_record/oracle_enhanced/type/dirty_spec.rb
|
142
146
|
- spec/active_record/oracle_enhanced/type/integer_spec.rb
|
147
|
+
- spec/active_record/oracle_enhanced/type/national_character_string_spec.rb
|
143
148
|
- spec/active_record/oracle_enhanced/type/raw_spec.rb
|
149
|
+
- spec/active_record/oracle_enhanced/type/json_spec.rb
|
144
150
|
- spec/active_record/oracle_enhanced/type/float_spec.rb
|
151
|
+
- spec/active_record/oracle_enhanced/type/timestamp_spec.rb
|
145
152
|
- spec/active_record/oracle_enhanced/type/boolean_spec.rb
|
146
|
-
- spec/active_record/oracle_enhanced/type/dirty_spec.rb
|
147
153
|
- spec/active_record/oracle_enhanced/type/binary_spec.rb
|
148
|
-
- spec/active_record/oracle_enhanced/type/
|
154
|
+
- spec/active_record/oracle_enhanced/type/decimal_spec.rb
|
149
155
|
- spec/active_record/oracle_enhanced/type/national_character_text_spec.rb
|
150
|
-
- spec/active_record/
|
151
|
-
- spec/active_record/
|
152
|
-
- spec/active_record/oracle_enhanced/
|
153
|
-
- spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
|
154
|
-
- spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
|
156
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
|
157
|
+
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
158
|
+
- spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb
|
155
159
|
- spec/active_record/connection_adapters/oracle_enhanced/dbms_output_spec.rb
|
156
|
-
- spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
|
157
|
-
- spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb
|
158
|
-
- spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
|
159
|
-
- spec/active_record/connection_adapters/oracle_enhanced/database_tasks_spec.rb
|
160
160
|
- spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
|
161
|
-
- spec/active_record/connection_adapters/oracle_enhanced/
|
161
|
+
- spec/active_record/connection_adapters/oracle_enhanced/database_tasks_spec.rb
|
162
|
+
- spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
|
163
|
+
- spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb
|
164
|
+
- spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
|
165
|
+
- spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
|
166
|
+
- spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
|
162
167
|
- spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
|
163
|
-
- spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
|
164
|
-
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
165
168
|
- spec/support/alter_system_user_password.sql
|
166
|
-
- spec/support/create_oracle_enhanced_users.sql
|
167
169
|
- spec/support/alter_system_set_open_cursors.sql
|
170
|
+
- spec/support/create_oracle_enhanced_users.sql
|
171
|
+
- spec/spec_helper.rb
|
168
172
|
- spec/spec_config.yaml.template
|