Changelog History
Page 1
-
v3.1.1 Changes
Serialize keys as strings when using JSON.
Reset attributes when calling
load!
.
-
v3.1.0 Changes
December 03, 2016- ๐ Use Nest instead of Nido
A new release of Nest (3.0.0) simplified the interaction with Redis.
- ๐ Use Model#hash for equality
This change just removes some slight redundancy in the code. The external behavior remains unchanged.
-
v3.0.3 Changes
June 15, 2016- ๐ Fix bug that gave false positives for unique indices.
Uniques were indexed for nil values as empty strings. This release fixes that issue.
-
v3.0.2 Changes
April 22, 2016- ๐ Fix bug created the wrong keys when indexing floats.
As reported by @slowernet, if an indexed attribute was assigned a real value with 0 fractional part (eg. 3.0), the
tostring
function in lua truncated the value to an integer. As a result, the index was created with the wrong key (Model:indices:attribute:3, instead of Model:indices:attribute:3.0). The fix is to convert all values to strings before sending them to the Lua script. -
v3.0.1 Changes
April 14, 2016- Adapt Lua scripts to Redis unstable.
-
v3.0.0 Changes
April 13, 2016- ๐ Use JSON instead of msgpack for internal encoding.
When Ohm started using Lua internally for saving, updating and deleting objects, it used msgpack for serializing. Redis supports both msgpack and JSON, and we picked msgpack because it produces a more compact representation. At some point, the Ruby msgpack library and the internal msgpack support in Redis diverged, and we were forced to lock the dependency to a specific gem version. Recently, some people complained about encoding issues originating from msgpack inside Redis, and once they tried a modified Ohm that uses JSON instead of msgpack, all their issues disappeared. That's why we think it's time for removing msgpack altogether and use JSON instead.
- ๐ Move the raise of MissingID to Ohm::Model#key.
In previous versions, trying to access an instance's
id
would raise aMissingID
error. The reason why raising that error is convenient is because it allows Ohm to fail as early as possible when you try to use an object that hasn't been saved yet. The error can arise from comparisons, from direct calls toid
, and also from any call to methods that needobject.key
to return a proper value, askey
in turn calls theid
method. But it turns out that many form builders rely on the fact that sending theid
message to most ORMs results in either a valid ID ornil
, and here Ohm was the exception. By moving the check fromid
tokey
, we can keep most of the previous behavior and we can returnnil
when sending theid
message to a new instance, thus making Ohm compatible with most form builders.- โ Add
Ohm::Model#increment
andOhm::Model#decrement
. These methods are aliases ofincr
anddecr
respectively.
-
v2.3.0 Changes
August 06, 2015- Retry save and delete if scripts were flushed in the server.
- Depend on Redic ~> 1.5.0 in order to use of
call!
instead ofcall
.
-
v2.2.1 Changes
May 28, 2015- ๐ Lock msgpack version
-
v2.2.0 Changes
March 03, 2015- ๐ Use Stal for set operations
-
v2.1.0 Changes
January 22, 2015- โ Add
combine
filter
- โ Add