table_saw 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e59849f10340f5303141bb40cc142664aa3c0ae0b69ea8ef55d35a917058a0f3
4
- data.tar.gz: f3ee222d576c0df5e1ead7a19762dbf948188ff771c1f99d25ec6673dc0bd48e
3
+ metadata.gz: 6b297b8f3066ede84566598a9afadad72dc7ee1474357f14983472ddc4fe4258
4
+ data.tar.gz: 7691d2a4e773ccc6de0c0c08d188cea9d703858939cac0770dcb1f7d318fd2e5
5
5
  SHA512:
6
- metadata.gz: 4b35a9db958e6ad546d6fb25fd4e58c1d853b787cf2b9cc4fe7f64cdb31d4d0e5834f45ccd66ae1d3a2f322b25dc704203965554821fa8407a5e83de518e3068
7
- data.tar.gz: dcaa3a15bdb561306694436af670622c5e386bd1b75d76cbc551e0f4092aee25120a46e24eabdd8460894e11ed14fc096c51646f008dfa2f25b8a464a9c667fc
6
+ metadata.gz: e9f7f60416d52018d03b96c659ce9cb3fc1808ec18a9febcd1fd21240cfb4086cc24da5ef54125971f35b69b1d805dc23155d04a92f6be0c0110663d218d7340
7
+ data.tar.gz: 8ee95715579cdca1c575fa9873419e1ecf05878e97dade07d58fb9928b8258d64c684519b10dd96a3b932b15adf5cdf01f25961e90e37196d57ed23121c06fb0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_saw (2.5.0)
4
+ table_saw (2.6.0)
5
5
  activerecord (>= 5.2)
6
6
  pg
7
7
  thor
@@ -18,16 +18,17 @@ module TableSaw
18
18
 
19
19
  def values
20
20
  TableSaw.schema_cache.columns(statement.table_name).zip(row)
21
- .map { |column, value| connection.quote(connection.type_cast_from_column(column, value)) }
21
+ .map { |column, value| quote_value(column, value) }
22
22
  .join(', ')
23
23
  end
24
24
 
25
- def schema_cache
26
- TableSaw.schema_cache
25
+ def connection
26
+ TableSaw.schema_cache.connection
27
27
  end
28
28
 
29
- def connection
30
- schema_cache.connection
29
+ def quote_value(column, value)
30
+ type = connection.lookup_cast_type_from_column(column)
31
+ connection.quote(type.serialize(type.deserialize(value)))
31
32
  end
32
33
  end
33
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSaw
4
- VERSION = '2.5.0'
4
+ VERSION = '2.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_saw
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamed Asghari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord