json2sql 1.0.18 → 1.0.19
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 +4 -4
- data/lib/json2sql/insert_model.rb +5 -4
- data/lib/json2sql/update_model.rb +5 -4
- data/lib/json2sql/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4263675b857b8c2b4636c84ce6a1db04e5978e01658e195cb3b79dbde3173c27
|
|
4
|
+
data.tar.gz: bae0d5591a25e926a44871ae1038f07f493f924e1aa1f08fd6e5bcded05011fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb5fe76dcbb74a89c7b9afc9258c924eef02cc1207b28843403eac47a5fe4c7706d0bde127b71b1be5c57334834190bb721143d54cbb09e15cc665461c758d97
|
|
7
|
+
data.tar.gz: ae838ba4cdf345631c890c64b65a78c9cfaa43a570cc895e226798282b52be652c05df376ca79e3f2ad97632c69cef0884f739165a80b51c95bbfad1fdd38a1e
|
|
@@ -81,10 +81,11 @@ module Json2sql
|
|
|
81
81
|
separator = true
|
|
82
82
|
|
|
83
83
|
case value
|
|
84
|
-
when
|
|
85
|
-
when
|
|
86
|
-
when
|
|
87
|
-
when
|
|
84
|
+
when NilClass then @sql << "NULL"
|
|
85
|
+
when Float then @sql << value.to_s
|
|
86
|
+
when Integer then @sql << value.to_s
|
|
87
|
+
when String then @sql << Sanitizer.value_wrap(value)
|
|
88
|
+
when :now then @sql << "NOW()"
|
|
88
89
|
end
|
|
89
90
|
end
|
|
90
91
|
end
|
|
@@ -69,10 +69,11 @@ module Json2sql
|
|
|
69
69
|
@sql << " = "
|
|
70
70
|
|
|
71
71
|
case value
|
|
72
|
-
when
|
|
73
|
-
when
|
|
74
|
-
when
|
|
75
|
-
when
|
|
72
|
+
when NilClass then @sql << "NULL"
|
|
73
|
+
when Float then @sql << value.to_s
|
|
74
|
+
when Integer then @sql << value.to_s
|
|
75
|
+
when String then @sql << Sanitizer.value_wrap(value)
|
|
76
|
+
when :now then @sql << "NOW()"
|
|
76
77
|
end
|
|
77
78
|
end
|
|
78
79
|
end
|
data/lib/json2sql/version.rb
CHANGED