pg_conn 0.42.0 → 0.42.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: 8d9aafa29dec55b879562f1ee2925322ccbde2c829d1c23c0529d41c171210e4
4
- data.tar.gz: de71188ab165e6c0d3b8d1d1e947e5ea9deb0615287da2467dfffa7ae048d910
3
+ metadata.gz: 1885ef3f2d7a35d098e8bf78136148634c7b2d828b33477235a3cd1e38765df6
4
+ data.tar.gz: 853369281c40c6c6fc60a80785f6166d27fcc500cf7f1e216e348adfed778c30
5
5
  SHA512:
6
- metadata.gz: 7852a85c9a0b0ec2d31429a800cc1362e0c42d9a143cff80dfc47f81c2cad4fa3517777e91143f2a4876148b641a252d888e9316f53642af8f341772bce2bf8f
7
- data.tar.gz: faf876c344f385b50f6813249114df1cec630ce85313517abb3e8a5a521524d14746fd58bed085cfc098298d0514bfa1c5bf17fa84fce0cb06790376a50699d4
6
+ metadata.gz: b839c16a46f84ae89f8bb941d08972f24edd3f3bf777d17197ad1cdaf5bc8e5ab368135e8222dac202a3b3d670c04c027e7a9afff00a0b851af8d899f93baef9
7
+ data.tar.gz: a9171073a19b5ed326eaf58a4d4fbcd4b61fad8bc1154e0c000e99b61c94b068ba8f70c14e773bd9eb455d0d7dd111a2bac02c4646c07b1bd01843d134338cb4
@@ -22,15 +22,15 @@ module PgConn
22
22
  def create(schema, authorization: nil)
23
23
  authorization_clause = authorization ? "authorization #{authorization}" : nil
24
24
  stmt = ["create schema", schema, authorization_clause].compact.join(" ")
25
- conn.exec stmt
25
+ conn.execute stmt
26
26
  end
27
27
 
28
28
  # Drop schema
29
29
  def drop(schema, cascade: false)
30
30
  if cascade
31
- conn.exec "drop schema if exists #{schema} cascade"
31
+ conn.execute "drop schema if exists #{schema} cascade"
32
32
  else
33
- conn.exec "drop schema if exists #{schema}"
33
+ conn.execute "drop schema if exists #{schema}"
34
34
  end
35
35
  true
36
36
  end
@@ -39,10 +39,10 @@ module PgConn
39
39
  # functions and procedures TODO)
40
40
  def empty!(schema, exclude: [])
41
41
  self.list_tables(schema, exclude: exclude).each { |table|
42
- conn.exec "drop table if exists #{schema}.#{table} cascade"
42
+ conn.execute "drop table if exists #{schema}.#{table} cascade"
43
43
  }
44
44
  self.list_views(schema, exclude: exclude).each { |view|
45
- conn.exec "drop view if exists #{schema}.#{view} cascade"
45
+ conn.execute "drop view if exists #{schema}.#{view} cascade"
46
46
  }
47
47
  end
48
48
 
@@ -50,7 +50,7 @@ module PgConn
50
50
  def clean!(schema, exclude: [])
51
51
  conn.session.triggers(false) {
52
52
  self.list_tables(schema, exclude: exclude).each { |table|
53
- conn.exec "delete from #{schema}.#{table}"
53
+ conn.execute "delete from #{schema}.#{table}"
54
54
  }
55
55
  }
56
56
  end
@@ -157,9 +157,9 @@ module PgConn
157
157
  uid = "#{schema}.#{table}"
158
158
  seq = sequence(schema, table) or raise ArgumentError, "Table #{uid} does not have a sequence"
159
159
  if value
160
- conn.exec "select setval('#{seq}', #{value})"
160
+ conn.execute "select setval('#{seq}', #{value})"
161
161
  else
162
- conn.exec "select setval('#{seq}', 1, false)"
162
+ conn.execute "select setval('#{seq}', 1, false)"
163
163
  end
164
164
  end
165
165
 
@@ -1,3 +1,3 @@
1
1
  module PgConn
2
- VERSION = "0.42.0"
2
+ VERSION = "0.42.1"
3
3
  end
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.42.0
4
+ version: 0.42.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen