activerecord-oracle_enhanced-adapter 5.2.1 → 5.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 192b152e571ea28d6e195b9245c3bfc6ee331254a1c55bb6d7605d5da9a50b91
|
4
|
+
data.tar.gz: a954652613d0ce95d24a75bc5b6784fe2750d25e37fc26448017c1c290246df0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04cee9773aab325fcaf71454ad982538a8940846e5b9780422f1836ff7089a20d5a9e0e8439ed7ca7770ecb956701b7b05a56ecb46a6ef7d7742306926b4fe6e
|
7
|
+
data.tar.gz: 1cee77e92e6f81f4c0f93c610cb6b0436ebf39a97dd14411633295b830878cb3de485e2220a15120b7fd8826d4caf1e094662d354696de83a3beff26c865ec97
|
data/History.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 5.2.2 / 2018-04-28
|
2
|
+
|
3
|
+
* Changes and bug fixes
|
4
|
+
* Use SQL literals for `column_definitions` and `pk_and_sequence_for` [#1678 #1713 #1714]
|
5
|
+
* Memoize if the table needs to prefetch primary key[#1673 #1699 #1700]
|
6
|
+
* CI with JRuby 9.1.17.0 [#1710]
|
7
|
+
* Remove `rails/arel` from Gemfile [#1711 #1712]
|
8
|
+
|
1
9
|
## 5.2.1 / 2018-04-15
|
2
10
|
|
3
11
|
* Changes and bug fixes
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.2.
|
1
|
+
5.2.2
|
@@ -518,7 +518,7 @@ module ActiveRecord
|
|
518
518
|
def column_definitions(table_name)
|
519
519
|
(owner, desc_table_name, db_link) = @connection.describe(table_name)
|
520
520
|
|
521
|
-
select_all(<<-SQL.strip.gsub(/\s+/, " "), "Column definitions"
|
521
|
+
select_all(<<-SQL.strip.gsub(/\s+/, " "), "Column definitions")
|
522
522
|
SELECT cols.column_name AS name, cols.data_type AS sql_type,
|
523
523
|
cols.data_default, cols.nullable, cols.virtual_column, cols.hidden_column,
|
524
524
|
cols.data_type_owner AS sql_type_owner,
|
@@ -531,8 +531,8 @@ module ActiveRecord
|
|
531
531
|
DECODE(data_type, 'NUMBER', data_scale, NULL) AS scale,
|
532
532
|
comments.comments as column_comment
|
533
533
|
FROM all_tab_cols#{db_link} cols, all_col_comments#{db_link} comments
|
534
|
-
WHERE cols.owner =
|
535
|
-
AND cols.table_name =
|
534
|
+
WHERE cols.owner = '#{owner}'
|
535
|
+
AND cols.table_name = #{quote(desc_table_name)}
|
536
536
|
AND cols.hidden_column = 'NO'
|
537
537
|
AND cols.owner = comments.owner
|
538
538
|
AND cols.table_name = comments.table_name
|
@@ -546,19 +546,19 @@ module ActiveRecord
|
|
546
546
|
def pk_and_sequence_for(table_name, owner = nil, desc_table_name = nil, db_link = nil) #:nodoc:
|
547
547
|
(owner, desc_table_name, db_link) = @connection.describe(table_name) unless owner
|
548
548
|
|
549
|
-
seqs = select_values(<<-SQL.strip.gsub(/\s+/, " "), "Sequence"
|
549
|
+
seqs = select_values(<<-SQL.strip.gsub(/\s+/, " "), "Sequence")
|
550
550
|
select us.sequence_name
|
551
551
|
from all_sequences#{db_link} us
|
552
|
-
where us.sequence_owner =
|
553
|
-
and us.sequence_name =
|
552
|
+
where us.sequence_owner = '#{owner}'
|
553
|
+
and us.sequence_name = upper(#{quote(default_sequence_name(desc_table_name))})
|
554
554
|
SQL
|
555
555
|
|
556
556
|
# changed back from user_constraints to all_constraints for consistency
|
557
|
-
pks = select_values(<<-SQL.strip.gsub(/\s+/, " "), "Primary Key"
|
557
|
+
pks = select_values(<<-SQL.strip.gsub(/\s+/, " "), "Primary Key")
|
558
558
|
SELECT cc.column_name
|
559
559
|
FROM all_constraints#{db_link} c, all_cons_columns#{db_link} cc
|
560
|
-
WHERE c.owner =
|
561
|
-
AND c.table_name =
|
560
|
+
WHERE c.owner = '#{owner}'
|
561
|
+
AND c.table_name = #{quote(desc_table_name)}
|
562
562
|
AND c.constraint_type = 'P'
|
563
563
|
AND cc.owner = c.owner
|
564
564
|
AND cc.constraint_name = c.constraint_name
|
@@ -542,17 +542,17 @@ describe "OracleEnhancedAdapter" do
|
|
542
542
|
expect(@logger.logged(:debug).last).to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["trigger_name", "TEST_POSTS_PKT"\], \["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
543
543
|
end
|
544
544
|
|
545
|
-
it "should return content from columns
|
545
|
+
it "should return content from columns without bind usage" do
|
546
546
|
expect(@conn.columns("TEST_POSTS").length).to be > 0
|
547
|
-
expect(@logger.logged(:debug).last).
|
548
|
-
expect(@logger.logged(:debug).last).
|
549
|
-
expect(@logger.logged(:debug).last).
|
547
|
+
expect(@logger.logged(:debug).last).not_to match(/:owner/)
|
548
|
+
expect(@logger.logged(:debug).last).not_to match(/:table_name/)
|
549
|
+
expect(@logger.logged(:debug).last).not_to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
550
550
|
end
|
551
551
|
|
552
|
-
it "should return pk and sequence from pk_and_sequence_for
|
552
|
+
it "should return pk and sequence from pk_and_sequence_for without bind usage" do
|
553
553
|
expect(@conn.pk_and_sequence_for("TEST_POSTS").length).to eq 2
|
554
|
-
expect(@logger.logged(:debug).last).
|
555
|
-
expect(@logger.logged(:debug).last).
|
554
|
+
expect(@logger.logged(:debug).last).not_to match(/:owner/)
|
555
|
+
expect(@logger.logged(:debug).last).not_to match(/\[\["owner", "#{DATABASE_USER.upcase}"\], \["table_name", "TEST_POSTS"\]\]/)
|
556
556
|
end
|
557
557
|
|
558
558
|
it "should return pk from primary_keys with bind usage" do
|
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.
|
4
|
+
version: 5.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raimonds Simanovskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|