prick 0.39.7 → 0.39.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prick/state.rb +2 -2
- data/lib/prick/subcommand/prick-drop.rb +2 -2
- data/lib/prick/version.rb +1 -1
- 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: d0d60cf8855c1cd7dcc4b0183a4dffbd308157cd7e15601ed5976a336ce8ceff
|
4
|
+
data.tar.gz: 62e2c45a335d45430f27c33a2a078ea45555dc41b722635ee33ce3a598b409d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc493ec4c4f87ac990c545da92be73817669fe71418fd3aa20c1604369a4860d7c03218a727546172b5f6f67761b338f1f1db1c5f1f08d351fda5ebdb88f59fb
|
7
|
+
data.tar.gz: 767d9ea5b0911f70603b4414fee3d29e259a5489c18a7d8edb6d1699d2915d3a7b096dcae7a0882e8d547e0ad6a3e5c73d560628b109214b71fe010cb792281f
|
data/lib/prick/state.rb
CHANGED
@@ -357,12 +357,12 @@ module Prick
|
|
357
357
|
|
358
358
|
def insert_record(table, attrs = {})
|
359
359
|
sql_fields = attrs.keys.join(", ")
|
360
|
-
sql_values = attrs.values.map { conn.
|
360
|
+
sql_values = attrs.values.map { conn.quote_value(_1) }.join(", ")
|
361
361
|
conn.value "insert into #{table} (#{sql_fields}) values (#{sql_values}) returning id"
|
362
362
|
end
|
363
363
|
|
364
364
|
def update_record(table, id, attrs = {})
|
365
|
-
sql_assign = attrs.map { |k,v| "#{conn.quote_identifier(k)} = #{conn.
|
365
|
+
sql_assign = attrs.map { |k,v| "#{conn.quote_identifier(k)} = #{conn.quote_value(v)}" }.join(", ")
|
366
366
|
sql_id_cond = (id.nil? ? "true" : "id = #{id}")
|
367
367
|
conn.exec "update #{table} set #{sql_assign} where #{sql_id_cond}"
|
368
368
|
end
|
@@ -50,8 +50,8 @@ module Prick::SubCommand
|
|
50
50
|
pool = builder.pool
|
51
51
|
schemas = pool.refresh_schemas
|
52
52
|
end
|
53
|
-
schema_list = conn.
|
54
|
-
schema_expr = schemas ? "true = true" : "schema_name in #{schema_list}"
|
53
|
+
schema_list = conn.quote_values(schemas)
|
54
|
+
schema_expr = schemas ? "true = true" : "schema_name in (#{schema_list})"
|
55
55
|
tables = conn.tuples %(
|
56
56
|
select schema_name, table_name, max_id
|
57
57
|
from prick.snapshots
|
data/lib/prick/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.
|
4
|
+
version: 0.39.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|