pg_conn 0.17.0 → 0.17.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: b6f8840c223cb2dd9a6a5f8b2211e43184eb308114ffdd8bdc76d92f6ea03e16
4
- data.tar.gz: fbfad4033c2d21abb91b726c183001d4edbaf348d61cb425b4b003dd89a37f35
3
+ metadata.gz: 64ed87e1cf308dd73256ca1a3785acee059ffbd8fc30d11303f0b494799b9dcb
4
+ data.tar.gz: 21076b277ee98f430d9fa19a882ab4a9242815b749a956ec76a210464517162c
5
5
  SHA512:
6
- metadata.gz: fe6647045b3bad635ed480e201967a20f0b11b5fd71bcbdec6766b6a2f056e3b0c8de045e87f56af90fb429130b2a9f105c46f5de5de31219b8384d18b27b3ca
7
- data.tar.gz: 5e114bd53908faf4a881799035276151ace147c63156cc006359e6483c182d0522d2a724f4e7b4fd551914739b23240c06a55319b46d4aa68c6bf65f0f8da095
6
+ metadata.gz: f657154a19e12be06b0e98668964f3b157745f3bbd90bad5e242416598e4be887c89dc7ae81ec56a109bf51aa66997e563825c43fb6a73d09e09711360a2395b
7
+ data.tar.gz: 3b5892c3e8f80dcae50cffef9ea128dab6d1bb349d72115c9cb2b5ceff3f0371c1622851192b78ecea8dc572812af6aa9e1b9133ef119b31f81f0772f7b6239a
@@ -1,3 +1,3 @@
1
1
  module PgConn
2
- VERSION = "0.17.0"
2
+ VERSION = "0.17.1"
3
3
  end
data/lib/pg_conn.rb CHANGED
@@ -558,6 +558,7 @@ module PgConn
558
558
 
559
559
  # Insert record(s) in a table. Returns the id of the inserted record(s)
560
560
  def insert(schema = nil, table, array_or_hash)
561
+ return [] if array_or_hash.empty?
561
562
  table = [schema, table].compact.join(".")
562
563
  is_array = array_or_hash.is_a?(Array)
563
564
  array = is_array ? array_or_hash : [array_or_hash]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_conn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen