Releases: cyjake/leoric
Releases · cyjake/leoric
v0.5.1
v0.5.0
- New:
Bone.sync()
to synchronize model with database - New:
Bone.createMigrationFile()
to create migration file - New:
Bone.migrate()
to run migrations - New:
Bone.bulkCreate()
to bulk insert records - New:
require('leoric')
now exportsRealm
to connect with multiple databases - New:
realm.define()
to define models in an old fashioned way - New:
realm.connect()
to connect with database - New: SQLite support without hacking node-sqlite3
- New:
Bone.DataTypes
for type references - New:
Bone.init()
to initialize models - New: an adaptor to use Leoric in (partially) Sequelize complaint API
- Refactor: a complete re-write of JOIN queries
- Refactor: added
Bone.driver
to better encapsulate and planish database nuances
v0.4.2
- New:
Spell#orWhere()
andSpell#orHaving()
- New: arithmetic operators
- New: unary operators such as unary minus
-
and bit invertion~
- 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 leavenull
as is - Fix:
INSERT ... UPDATE
withid = LAST_INSERT_ID(id)
in MySQL - Fix:
Model.find({ name: { $op1, $op2 } })
object conditions with multiple operators - Fix: prefixing result set with qualifiers if query contains join relations and is not dispatchable
- Fix:
Spell#$get(index)
with LIMIT - Docs:
Model.transaction()
- Docs: definition types with
index.d.ts
v0.2.0 Jorma Kaukonen
- Breaking: renamed to Jorma, as an acronym of JavaScript Object-Relational Mapping Alchemy
v0.1.8
v0.1.7
- Refactor:
{ type: 'op', name: 'as' }
renamed to{ type: 'alias' }
- New:
{ type: 'mod' }
for modifier, currently onlyDISTINCT
is recognized - New: unary operators like
!
andNOT
- New:
IS
andIS NOT
- Fix: logic operator precendences
- Fix: polymorphic hasMany({ through }) relations
- Fix: dispatching multiple results with joins correctly
v0.1.6
v0.1.5
- 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
v0.1.4
- 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
v0.1.3
A proper expression parser that supports compound conditions like (a = 1 or a = 2) and b = 3
. The formatter in Spell is updated accordingly.
- 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.