pg_adaptor 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pg_adaptor.rb +3 -2
- data/lib/pg_adaptor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8931d215201a846318a6ba1c18570047c1527bd
|
4
|
+
data.tar.gz: a9aa723946d7ab816b55e878d1162a04c6b4b8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 628a886a5c6031249158082d564b99c30670876ef9685808ddb0d61fd69c2052b9de72283d5184e25139c84400c39f195af8aa1541e880c7b7a24dea6e7420e0
|
7
|
+
data.tar.gz: e5802e47470b88a6359fc0e900dd557d7441b02b97675aced97e2028b0fc4269dd0f62d342288bfddec2ca830d1835fcbcd4bddba6438ffbb3ab0688a0f82701
|
data/lib/pg_adaptor.rb
CHANGED
@@ -66,8 +66,9 @@ private
|
|
66
66
|
next if field == :id && value.nil?
|
67
67
|
raise "Field not present in schema: #{field}" unless schema[field.to_sym]
|
68
68
|
case schema[field.to_sym][:db_type]
|
69
|
-
when "jsonb"
|
70
|
-
when
|
69
|
+
when "jsonb" then fields[field] = Sequel.pg_jsonb value
|
70
|
+
when "json" then fields[field] = Sequel.pg_json value
|
71
|
+
when /\[\]$/ then fields[field] = Sequel.pg_array value
|
71
72
|
else
|
72
73
|
fields[field] = value
|
73
74
|
end
|
data/lib/pg_adaptor/version.rb
CHANGED