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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfb662385fd9e2cc88b6f06b7169b06b0daa5d893613eb9a917d0c0cc449ebb7
4
- data.tar.gz: '09648f01535b6afe6c8e78f347e8e27215f8ac558488b2eafd9b46998835fc25'
3
+ metadata.gz: '0819b55757ac186639c7615df4a1ec09fb449e85216a19cad30c7a6f8feb139f'
4
+ data.tar.gz: fdf28a9434d88abf0fb0f89b3459aeaf2602b1644524a931ab1b84832f9067a3
5
5
  SHA512:
6
- metadata.gz: 4c56b84dee0d6e7073fec4b98466a03a8d88aae2c3a97bb98b855b1d48889f5611d90596bdefffe972ad4fb2602e46ae918d25e7ccbb7d88e6e2f40191967c7d
7
- data.tar.gz: b36e951ac7073bae385b1fbf9a6e15ccdc93ffb30209e9476474723684d434fb655131a007c6d4e5caa71402713320deac21048a35f17788b400b4b7991e302e
6
+ metadata.gz: a053216dde0bb4e3d060ff3dcd58527f2f36b1e560057020a8610c54fa32e00d0390c15841d44e3733039f10fa8a14cf98cb99660bd2d05daa1be9e2941dc139
7
+ data.tar.gz: 7c88b089bd4dbd3892ae20622a6edc0e2caf89f837833f78cf99fcb20bca91c92aad885029f5e381946970937414782513c3f7d4053d41512d391af0d6015eff
@@ -1,3 +1,3 @@
1
1
  module PgConn
2
- VERSION = "0.32.2"
2
+ VERSION = "0.33.1"
3
3
  end
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 records returned"
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, current_timestamp::timestamp without time zone'
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.32.2
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-02-15 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg