simple-sql 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/simple/sql/decoder.rb +7 -1
- data/lib/simple/sql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2efe4d2f3574002cd742ec35b92008be1759d00
|
4
|
+
data.tar.gz: 6d91555bba894180b6f0204be9cff494d5a75747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c0f34107ae8c103bbfdef1ec6ad5f1c79e66de50c47880e7a0693c18cd6c1ad6f2e4b1800620f65566d82b488dd95fec8d40e604bf9bc2a8bf42051a30e165c
|
7
|
+
data.tar.gz: 7e85012e105fd64d0b322c6ec99e020c57ec54b3bc5b7f3d625b8cb69eb7cb056b5da9abdd847bd07893b8183a6e8eb3f52af74f23532fd3db3fd23c7cd75d8d
|
data/Gemfile.lock
CHANGED
data/lib/simple/sql/decoder.rb
CHANGED
@@ -9,6 +9,12 @@ module Simple::SQL::Decoder
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
+
def parse_timestamp(s)
|
13
|
+
r = ::Time.parse(s)
|
14
|
+
return r if r.utc_offset == 0
|
15
|
+
Time.gm(r.year, r.mon, r.day, r.hour, r.min, r.sec)
|
16
|
+
end
|
17
|
+
|
12
18
|
# rubocop:disable Metrics/AbcSize
|
13
19
|
# rubocop:disable Metrics/CyclomaticComplexity
|
14
20
|
# rubocop:disable Metrics/MethodLength
|
@@ -22,7 +28,7 @@ module Simple::SQL::Decoder
|
|
22
28
|
when :'integer[]' then s.scan(/-?\d+/).map { |part| Integer(part) }
|
23
29
|
when :"character varying[]" then parse_pg_array(s)
|
24
30
|
when :"text[]" then parse_pg_array(s)
|
25
|
-
when :"timestamp without time zone" then
|
31
|
+
when :"timestamp without time zone" then parse_timestamp(s)
|
26
32
|
when :hstore then HStore.parse(s)
|
27
33
|
when :json then ::JSON.parse(s)
|
28
34
|
when :jsonb then ::JSON.parse(s)
|
data/lib/simple/sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg_array_parser
|