pg_conn 0.3.2 → 0.3.5
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/Gemfile +0 -3
- data/lib/pg_conn/schema_methods.rb +1 -1
- data/lib/pg_conn/version.rb +1 -1
- data/lib/pg_conn.rb +5 -6
- data/pg_conn.gemspec +2 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ac1d6afe8aefb33c2abfb88f2741ff2e1d1bacf4d6abc1936ecd178a36eaec5
|
4
|
+
data.tar.gz: 1596428cde81f7d3fe9cb9087e2c6c8c3d8a58ff696ead2156b512cb72ea6497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a04dd7e76e131e04e4e1b37786b2667bc09786ae5dc570fc3d4cd6a52909ea9d2335e27b0bfa5ca1fb30d371e76055f8d498d106f919e52cb001a0f7b11e3a60
|
7
|
+
data.tar.gz: 31db0d179111b95440acf06b743c3cefbf30900f85ac311b81c82a224f73e5b871439ede71d2bf5b50393bfd0c79c75254d33ab77f1a26c998ec9a2bc855888e
|
data/Gemfile
CHANGED
@@ -157,7 +157,7 @@ module PgConn
|
|
157
157
|
a.atttypid::regtype::text as "type"
|
158
158
|
from pg_class c
|
159
159
|
join pg_attribute a on a.attrelid = c.oid
|
160
|
-
where relnamespace::regnamespace::text = '
|
160
|
+
where relnamespace::regnamespace::text = '#{schema}'
|
161
161
|
and a.attnum > 0
|
162
162
|
),
|
163
163
|
relation_clause
|
data/lib/pg_conn/version.rb
CHANGED
data/lib/pg_conn.rb
CHANGED
@@ -64,8 +64,6 @@ module PgConn
|
|
64
64
|
# #exec or #transaction block
|
65
65
|
attr_reader :timestamp
|
66
66
|
|
67
|
-
|
68
|
-
|
69
67
|
# :call-seq:
|
70
68
|
# initialize(dbname = nil, user = nil, field_name_class: Symbol)
|
71
69
|
# initialize(connection_hash, field_name_class: Symbol)
|
@@ -100,6 +98,7 @@ module PgConn
|
|
100
98
|
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
101
99
|
# for the full list
|
102
100
|
#
|
101
|
+
# TODO: Change to 'initialize(*args, **opts)'
|
103
102
|
def initialize(*args)
|
104
103
|
if args.last.is_a?(Hash)
|
105
104
|
@field_name_class = args.last.delete(:field_name_class) || Symbol
|
@@ -182,17 +181,17 @@ module PgConn
|
|
182
181
|
@pg_connection.close if @pg_connection && !@pg_connection.finished?
|
183
182
|
end
|
184
183
|
|
185
|
-
def self.new(*args, &block)
|
184
|
+
def self.new(*args, **opts, &block)
|
186
185
|
if block_given?
|
187
186
|
begin
|
188
187
|
object = Connection.allocate
|
189
|
-
object.send(:initialize, *args)
|
188
|
+
object.send(:initialize, *args, **opts)
|
190
189
|
yield(object) # if object.pg_connection
|
191
190
|
ensure
|
192
191
|
object.terminate if object.pg_connection
|
193
192
|
end
|
194
193
|
else
|
195
|
-
super(*args)
|
194
|
+
super(*args, **opts)
|
196
195
|
end
|
197
196
|
end
|
198
197
|
|
@@ -638,7 +637,7 @@ module PgConn
|
|
638
637
|
def pg_exec(arg, fail: true, silent: false)
|
639
638
|
if @pg_connection
|
640
639
|
begin
|
641
|
-
last_stmt = nil # To make the current SQL statement visible to the rescue clause
|
640
|
+
last_stmt = nil # To make the current SQL statement visible to the rescue clause. FIXME Not used?
|
642
641
|
if arg.is_a?(String)
|
643
642
|
return nil if arg == ""
|
644
643
|
last_stmt = arg
|
data/pg_conn.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_conn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: simplecov
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|