pg_conn 0.3.4 → 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/lib/pg_conn/version.rb +1 -1
- data/lib/pg_conn.rb +5 -4
- 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: 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/lib/pg_conn/version.rb
CHANGED
data/lib/pg_conn.rb
CHANGED
@@ -98,6 +98,7 @@ module PgConn
|
|
98
98
|
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
99
99
|
# for the full list
|
100
100
|
#
|
101
|
+
# TODO: Change to 'initialize(*args, **opts)'
|
101
102
|
def initialize(*args)
|
102
103
|
if args.last.is_a?(Hash)
|
103
104
|
@field_name_class = args.last.delete(:field_name_class) || Symbol
|
@@ -180,17 +181,17 @@ module PgConn
|
|
180
181
|
@pg_connection.close if @pg_connection && !@pg_connection.finished?
|
181
182
|
end
|
182
183
|
|
183
|
-
def self.new(*args, &block)
|
184
|
+
def self.new(*args, **opts, &block)
|
184
185
|
if block_given?
|
185
186
|
begin
|
186
187
|
object = Connection.allocate
|
187
|
-
object.send(:initialize, *args)
|
188
|
+
object.send(:initialize, *args, **opts)
|
188
189
|
yield(object) # if object.pg_connection
|
189
190
|
ensure
|
190
191
|
object.terminate if object.pg_connection
|
191
192
|
end
|
192
193
|
else
|
193
|
-
super(*args)
|
194
|
+
super(*args, **opts)
|
194
195
|
end
|
195
196
|
end
|
196
197
|
|
@@ -636,7 +637,7 @@ module PgConn
|
|
636
637
|
def pg_exec(arg, fail: true, silent: false)
|
637
638
|
if @pg_connection
|
638
639
|
begin
|
639
|
-
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?
|
640
641
|
if arg.is_a?(String)
|
641
642
|
return nil if arg == ""
|
642
643
|
last_stmt = arg
|
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
|