brick 1.0.144 → 1.0.145
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/lib/brick/extensions.rb +8 -3
- data/lib/brick/version_number.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4eb70e62d39a7516769b8476c99af1173eb9965d551146a1287fcd615faedf22
|
|
4
|
+
data.tar.gz: 3a8f9635d6d7db583df4354a1d0cbde013d7df9ec07101e0b6ffa92bece48134
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9faadbd4e71fe53a5deb94424133b701d6db9a64b12323e804385cb1a4df3e68b7a8da1c5d59f14efe2ef5b2e1e20e7543cb427a924f9ae0e41008f5e0a4b75d
|
|
7
|
+
data.tar.gz: d296a285cdb3a08482e36d0d1be52bb18709d63aa38677e1887157f88e3a7123b3b6f6e54f50241b915f68d272f30dec5db28b5efd74ae41e099ffca5abc7c89
|
data/lib/brick/extensions.rb
CHANGED
|
@@ -2661,6 +2661,7 @@ ORDER BY 1, 2, c.internal_column_id, acc.position"
|
|
|
2661
2661
|
|
|
2662
2662
|
def retrieve_schema_and_tables(sql = nil, is_postgres = nil, is_mssql = nil, schema = nil)
|
|
2663
2663
|
is_mssql = ActiveRecord::Base.connection.adapter_name == 'SQLServer' if is_mssql.nil?
|
|
2664
|
+
params = ar_tables
|
|
2664
2665
|
sql ||= "SELECT t.table_schema AS \"schema\", t.table_name AS relation_name, t.table_type,#{"
|
|
2665
2666
|
pg_catalog.obj_description(
|
|
2666
2667
|
('\"' || t.table_schema || '\".\"' || t.table_name || '\"')::regclass::oid, 'pg_class'
|
|
@@ -2698,12 +2699,16 @@ ORDER BY 1, 2, c.internal_column_id, acc.position"
|
|
|
2698
2699
|
"NOT IN ('information_schema', 'pg_catalog', 'pg_toast', 'heroku_ext',
|
|
2699
2700
|
'INFORMATION_SCHEMA', 'sys')"
|
|
2700
2701
|
:
|
|
2701
|
-
"= '#{ActiveRecord::Base.connection.current_database&.tr("'", "''")}'"}#{
|
|
2702
|
-
|
|
2702
|
+
"= '#{ActiveRecord::Base.connection.current_database&.tr("'", "''")}'"}#{
|
|
2703
|
+
if is_postgres && schema
|
|
2704
|
+
params = params.unshift(schema) # Used to use this SQL: current_setting('SEARCH_PATH')
|
|
2705
|
+
"
|
|
2706
|
+
AND t.table_schema = COALESCE(?, 'public')"
|
|
2707
|
+
end}
|
|
2703
2708
|
-- AND t.table_type IN ('VIEW') -- 'BASE TABLE', 'FOREIGN TABLE'
|
|
2704
2709
|
AND t.table_name NOT IN ('pg_stat_statements', ?, ?)
|
|
2705
2710
|
ORDER BY 1, t.table_type DESC, 2, c.ordinal_position"
|
|
2706
|
-
ActiveRecord::Base.execute_sql(sql, *
|
|
2711
|
+
ActiveRecord::Base.execute_sql(sql, *params)
|
|
2707
2712
|
end
|
|
2708
2713
|
|
|
2709
2714
|
def ar_tables
|
data/lib/brick/version_number.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brick
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.145
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lorin Thwaits
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-05-
|
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|