Releases: neumino/thinky
Releases · neumino/thinky
v.1.15.8
- Save references of linked documents in
setSaved
and not in the constructor (without checking if the document is actually saved or not) - Fix #166 - Partially merge the code path for
document.save
andModel.save
. - Enable the syntax
Model.ensureIndex(name, options)
- Fix #168 - Added comments and annotations again
v.1.15.7
v.1.15.6
v.1.15.5
v.1.15.4
v1.15.3
v.1.15.2
- Add a new way to declare a schema with chainable types -- #145
- Unify the schema under the hood
- Move
getVirtualFields
/getDefaultFields
to type - Move validation to type, yielding slightly better performance
- Add some safety in generating default fields/virtual fields when a parent field is undefined
v1.15.1
Code hygiene::
- Faster tests -- Tests run in ~30 seconds instead of 3 minutes
- The biggest methods have been refactored in smaller ones (like
save
,hooks
etc.)
Performance:
-
Generating default fields is done in O(n) where n is the number of fields that can be generated
-
Generating virtual fields is done in O(n) where n is the number of virtual fields
-
Less copying for options and documents. One big difference is copying values for new documents is not done the first time. Meaning:
var data = {name: "Michel"}; var doc = new User(data); doc === data; // true, used to be false var doc2 = new User(data); doc === data; // true doc2 !== data; // true
-
v8 optimizations (
try
/catch
,bind
,for of
etc.)
Bugs::
v.1.15.0
Note: Non backward compatible change:
enforce_extra
can be"strict"
/"remove"
/"none"
. The previous valuetrue
should be replace with"strict"
andfalse
should be replaced with"none"
.- Update for RethinkDB 1.15
- New type: "Point"
enforce_extra
:"remove"
will remove extra fields (fields not declared in the schema) when callingvalidate
(orsave
, which will callvalidate
under the hood).
One nice use case is the one described by @marshall007 (who also submitted this change) here: #123 (comment)