pg_conn 0.32.2 → 0.33.1
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 +7 -7
- 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: '0819b55757ac186639c7615df4a1ec09fb449e85216a19cad30c7a6f8feb139f'
|
4
|
+
data.tar.gz: fdf28a9434d88abf0fb0f89b3459aeaf2602b1644524a931ab1b84832f9067a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a053216dde0bb4e3d060ff3dcd58527f2f36b1e560057020a8610c54fa32e00d0390c15841d44e3733039f10fa8a14cf98cb99660bd2d05daa1be9e2941dc139
|
7
|
+
data.tar.gz: 7c88b089bd4dbd3892ae20622a6edc0e2caf89f837833f78cf99fcb20bca91c92aad885029f5e381946970937414782513c3f7d4053d41512d391af0d6015eff
|
data/lib/pg_conn/version.rb
CHANGED
data/lib/pg_conn.rb
CHANGED
@@ -644,15 +644,15 @@ module PgConn
|
|
644
644
|
# of the function. If the :proc option is true the "function" is assumed
|
645
645
|
# to be a procedure
|
646
646
|
#
|
647
|
-
def call(name, *args, elem_type: nil, proc: false) # :proc may interfere with hashes
|
647
|
+
def call(name, *args, elem_type: nil, silent: false, proc: false) # :proc may interfere with hashes
|
648
648
|
args_seq = quote_values(args, elem_type: elem_type)
|
649
649
|
if proc
|
650
|
-
pg_exec "call #{name}(#{args_seq})"
|
650
|
+
pg_exec "call #{name}(#{args_seq})", silent: silent
|
651
651
|
return nil
|
652
652
|
else
|
653
|
-
r = pg_exec "select * from #{name}(#{args_seq})"
|
653
|
+
r = pg_exec "select * from #{name}(#{args_seq})", silent: silent
|
654
654
|
if r.ntuples == 0
|
655
|
-
raise Error, "No
|
655
|
+
raise Error, "No value returned"
|
656
656
|
elsif r.ntuples == 1
|
657
657
|
if r.nfields == 1
|
658
658
|
r.values[0][0]
|
@@ -668,8 +668,8 @@ module PgConn
|
|
668
668
|
end
|
669
669
|
|
670
670
|
# Like #call with :proc set to true
|
671
|
-
def proc(name, *args)
|
672
|
-
call(name, *args, proc: true)
|
671
|
+
def proc(name, *args, silent: false)
|
672
|
+
call(name, *args, silent: silent, proc: true)
|
673
673
|
end
|
674
674
|
|
675
675
|
# :call-seq:
|
@@ -889,7 +889,7 @@ module PgConn
|
|
889
889
|
# and log as a side-effect)
|
890
890
|
if @pg_connection
|
891
891
|
@timestamp, @timestamptz = @pg_connection.exec(
|
892
|
-
'select current_timestamp
|
892
|
+
'select current_timestamp::timestamp without time zone, current_timestamp'
|
893
893
|
).tuple_values(0)
|
894
894
|
end
|
895
895
|
end
|
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.
|
4
|
+
version: 0.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|