lib/picky/backends/sqlite/value.rb in picky-4.4.2 vs lib/picky/backends/sqlite/value.rb in picky-4.5.0

- old
+ new

@@ -11,19 +11,19 @@ end def []= key, value db.execute 'INSERT OR REPLACE INTO key_value (key, value) VALUES (?,?)', key.to_s, - Yajl::Encoder.encode(value) + MultiJson.encode(value) value end def [] key res = db.execute "SELECT value FROM key_value WHERE key = ? LIMIT 1;", key.to_s return nil if res.empty? - Yajl::Parser.parse res.first.first + MultiJson.decode res.first.first end def delete key db.execute "DELETE FROM key_value WHERE key = (?)", key.to_s end