db-mariadb 0.8.3 → 0.9.0

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: 9aad0e184030772a20c5e6927379a959524a917306ebdb1db4f3208368769976
4
- data.tar.gz: c52c6a94ab5ddd1051c55cab3462fe865cb1250af99765264caa67860320f677
3
+ metadata.gz: cdabbcef5551dd3be495d8d81e4c9f0429869d122d6bd709e70b34e3559920c6
4
+ data.tar.gz: 7535f54e25c490e9269ded81e9e817f898ba2945d65beeb0d1d1e48058b8a41a
5
5
  SHA512:
6
- metadata.gz: 4c68452f96e3b7e886a914e87aa789e9e3986a21b84229d32fa8b068790c40f21d812b6b28ae123506d72846225bbf99986f39220027f28cb7cbb942c213b2bd
7
- data.tar.gz: 9654fb6d67cbd567076b3bd1a2b86b1e3e93caef68cc56a6fd9f5808706da882c887a7728851b8f5dc051b40e4a81b138fae88d562ed717c05cb596acb626d04
6
+ metadata.gz: a0e0faeb7065dd9138baabdde82200083ad769d72ee5149a414a68b8122d4ad884c4308544d66d8aa9c6d55cb46759e5fc6890f1f718124d6f248018229bcdba
7
+ data.tar.gz: 37bc20b8fa6b5ee0b047ba8d2b95b2b2176b9414a918ba0831e039aac94ca8f8e1c849c8e483d6334b1c0e71a891c01b74b7223d36d17b0e2b3a705b2f9a9fa6
data/lib/.DS_Store CHANGED
Binary file
@@ -74,7 +74,7 @@ module DB
74
74
  year: Types::Integer,
75
75
  newdate: Types::DateTime,
76
76
  bit: Types::Integer,
77
- json: JSON,
77
+ json: Types::JSON,
78
78
  newdecimal: Types::Decimal,
79
79
  enum: Types::Symbol,
80
80
  set: Types::Integer,
@@ -29,33 +29,41 @@ module DB
29
29
  module Types
30
30
  module Integer
31
31
  def self.parse(string)
32
- Integer(string)
32
+ Integer(string) if string
33
33
  end
34
34
  end
35
35
 
36
36
  module Decimal
37
37
  def self.parse(string)
38
- BigDecimal(string)
38
+ BigDecimal(string) if string
39
39
  end
40
40
  end
41
41
 
42
42
  module Float
43
43
  def self.parse(string)
44
- Float(string)
44
+ Float(string) if string
45
45
  end
46
46
  end
47
47
 
48
48
  module Symbol
49
49
  def self.parse(string)
50
- string.to_sym
50
+ string&.to_sym
51
51
  end
52
52
  end
53
53
 
54
54
  module DateTime
55
55
  def self.parse(string)
56
- parts = string.split(/[\-\s:]/)
57
-
58
- return Time.utc(*parts)
56
+ if string
57
+ parts = string.split(/[\-\s:]/)
58
+
59
+ return Time.utc(*parts)
60
+ end
61
+ end
62
+ end
63
+
64
+ module JSON
65
+ def self.parse(string)
66
+ ::JSON.parse(string, symbolize_names: true) if string
59
67
  end
60
68
  end
61
69
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module DB
22
22
  module MariaDB
23
- VERSION = "0.8.3"
23
+ VERSION = "0.9.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-mariadb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-04 00:00:00.000000000 Z
11
+ date: 2021-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi-module