- Fix: unset attribute should be overwritable
- Fix:
attributeChanged()should be false if attribute is unset and not overwritten - Fix: subclass with incomplete getter/setter should be complemented
- Fix: sharding key validation on
Bone.update()andBone.save() - Fix: sharding key should be along with primary key on
bone.remove() - Fix:
Bone.cast()should leavenullas is
- New: premature sharding key validation
- Fix: output complete SQL instead of parameterized query with values.
- Fix: both
connect({ model })andconnect({ models })are allowed. - Docs: no more
.findOrCreate(), just.upsert() - Docs: table of contents with kramdown's
{:toc} - Misc: droped experimental sqlite3 support
- New: PostgreSQL support
- New: Transaction support
- Upgrade: (forked) SQLite client updated to SQLite 3.24
- New: SQLite support with a forked sqlite3
- New: mysql2 support (which is trivial since both mysql and mysql2 share the same API)
- Refactor: Spell now formats SQL with the literals separated, which gets escaped by the corresponding client itself later on.
- Breaking: renaming
- Fix: implement
query.batch()as async iterator - Fix:
NOT (expr) - Fix:
IFNULL(foo, default) - Fix: support
.select(name[]),.select(name => {}), and.select("...name") - Docs:
Model => classNamein association options - Docs: use jsdoc to generate docs/api
- Docs:
.include()
- Refactor:
{ type: 'op', name: 'as' }renamed to{ type: 'alias' } - New:
{ type: 'mod' }for modifier, currently onlyDISTINCTis recognized - New: unary operators like
!andNOT - New:
ISandIS NOT - Fix: logic operator precendences
- Fix: polymorphic hasMany({ through }) relations
- Fix: dispatching multiple results with joins correctly
- New: proper
.first,.last,.all, and.get(index) - Fix: accept
Date,boolean, andSetvalues - Fix:
Model.unscoped - Fix:
Model.remove({}, true)should be unscoped
- Refactor: encapsulate column names. Keep them from the users even if the query results can not be dispatched.
- Fix: complicated groups with joins should discard the use of subquery.
- Fix: camelCase should replace globally
- Fix: avoid missing attribtue exception when toJSON/toObject
- Fix: should format condition arrays by hand instead of hand it over to formatExpr
- Fix: whereConditions of subquery should retain the order of the whereConditions in major query
- Fix: calculated columns should be kept in the final columns when sorting out the attributes
- Fix: doesn't depend on co anymore
- Fix:
select distict foo from table; - Fix:
where (a = 1 or a = 2) and b = 3; - Docs: a syntax table to provide a better glance over the querying ability.
- Fix: copy left table's orders into subquery to make order/limit work when combined.
- Fix: errors should be thrown when accessing attributes that weren't selected at the first place.
- Refactor: automatic versioning on spells. When client calls query methods with chaining, new versions of spell gets duplicated. Makes reuse of spells possible.
- Docs: english verion is almost complete http://cyj.me/leoric.
- Initial version, covers basic usage such as model authoring, database connection, query interface, and association.