Models now have their own custom model.Instance classes
These classes inherit from Instance and provide virtuals and methods
via their prototype, allowing for considerably more lightweight instances
creation and (hopefully) functional intellisense for virtuals and methods.
Use model specific instances for schema values
Another major optimization, since it means we don't need to define
property accessors on a per-instance basis when creating Instances.
Should vastly improve performance and memory usage for databases which
adhere to their specified schemas, those that don't should add
{ $required: false, $type: ... } to their schemas to take advantage of
these optimizations.
Updated LICENCE
Added a benchmark suite
Added benchmark results to README
Added async module to package.json
Improvements to Model methods
We've made improvements to Model's insert/create method which allow it to execute
faster (by running preperations in parallel) while also avoiding stack overflows
when inserting a large number of elements.
Similarly, we've rewritten the onReceived processor to improve readability and
performance a bit (it was already async) while adding support for executing queries
without having the results wrapped in Instance objects - if you don't require that.
Added Database.close() and Database.disconnect() methods to allow graceful closing of DB connections
Version bump to v2.7.0