postgres_utility 1.0.1 → 1.0.2
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/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/postgres_utility/version.rb +1 -1
- data/lib/postgres_utility.rb +2 -2
- 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: 7ed67095a5644c9a35c4318e8204838b3cf69cccc6912c6f133fb5638daf049e
|
|
4
|
+
data.tar.gz: d340d2ab167c6ef9a0bef754f5769aab914114043f577f5ee416040272b52325
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0052ed4b3fdcef0f06ff62ef54b1cef2f5998c215903bd2d3cee73377c81f332531c3db2e66b85de986bae5138118f880abfe91841b84ebb15b43b62d4e23ef6
|
|
7
|
+
data.tar.gz: e54235fd982ef0cda47b05636cf0d1d204586bc51f26b272d4c0571315d6c5ee23aab7dd3cd9b88e0fc3b3e61c3e47d71c450f79eb167685c7c0e2ac556763ff
|
data/CHANGELOG.md
CHANGED
|
@@ -6,4 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
## [1.0.1] - 2021-10-08
|
|
8
8
|
|
|
9
|
-
- use sanitize method instead of sanitize_sql if sanitize_sql is not supported by activerecord
|
|
9
|
+
- use sanitize method instead of sanitize_sql if sanitize_sql is not supported by activerecord
|
|
10
|
+
|
|
11
|
+
## [1.0.1] - 2021-10-27
|
|
12
|
+
|
|
13
|
+
- update multi_truncate_reset_populate_from_csv to use column_names from first argument tables
|
data/Gemfile.lock
CHANGED
data/lib/postgres_utility.rb
CHANGED
|
@@ -246,8 +246,8 @@ module PostgresUtility
|
|
|
246
246
|
# transaction, we will manually need to drop this table
|
|
247
247
|
pg_conn.exec("CREATE TABLE #{tbl_copy} (LIKE #{tbl} INCLUDING DEFAULTS)")
|
|
248
248
|
# pg_conn.exec("DROP TABLE IF EXISTS #{tbl_copy}")
|
|
249
|
-
if
|
|
250
|
-
cols =
|
|
249
|
+
if table[:column_names].present? && table[:column_names].is_a?(Array)
|
|
250
|
+
cols = table[:column_names].join(',')
|
|
251
251
|
qcopy = "COPY #{tbl_copy}(#{cols}) FROM STDIN WITH DELIMITER ',' CSV HEADER"
|
|
252
252
|
else
|
|
253
253
|
qcopy = "COPY #{tbl_copy} FROM STDIN WITH DELIMITER ',' CSV HEADER"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postgres_utility
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sachinsaxena1996
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|