Releases: SierraSoftworks/Iridium
Version 2.6.0 Release
This release focuses on improving the performance and reducing the overhead of document instances. In previous versions we were creating a function for each instance's save, update and remove methods. This has been dropped in favor of using Instance.prototype
in combination with this.__state
to give the same result while allowing the runtime to cache the prototype
object for all instances. Technically this has had no major changes to the API (though we have added alternate verbs for some of these methods, (refresh = update), (delete = remove)), but since it is a large change we have bumped the version anyway.
Version 2.5.0 Release
This release focuses on improving the hooks system to allow a bit more flexibility and to make managing things easier from a maintenance perspective.
We've renamed existing hooks and added new ones with the following signatures.
{
hooks: {
creating: function([done]) { },
saving: function(changes, [done]) { },
retrieved: function([done]) { },
ready: function([done]) { }
}
}
A quick description of what these hooks do can be found in the README, but I've copied that section here for your convenience.
- creating([done])
Called before an object is first stored in the database,this
is set to the contents of the object being stored - allowing modification of the object prior to its insertion into the database. - saving(changes[, done])
Called before an exisiting object is updated in the database (not called forModel.update()
) withthis
set to the instance of the object being updated and the first argument always being the object changeset (MongoDB update syntax), allowing you to perform custom updates each time an object is saved. - retrieved([done])
Called after an object has been retrieved from the database, but before it is wrapped into an Instance. The hook'sthis
is set to the database document received - and will not have undergone any preprocessing yet. - ready([done])
Called after an object has undergone preprocessing and has been wrapped into an Instance, allowing you to set non-persistent properties on the object (for example, retrieval time for a cache).
v1.0.0 Release
This is our first external release of this module. We've previously used the code to deploy a major web application and are fairly confident in its stability, however if you've got any concerns then please open an issue and we'll look into helping resolve them.