Skip to content

Releases: cyjake/leoric

v0.5.1

21 Feb 03:31
50a1bd4
Compare
Choose a tag to compare
  • support @journeyapps/sqlcipher

v0.5.0

19 Feb 02:17
3f708c3
Compare
Choose a tag to compare
  • 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 exports Realm 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

26 Apr 09:44
Compare
Choose a tag to compare
  • New: Spell#orWhere() and Spell#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() and Bone.save()
  • Fix: sharding key should be along with primary key on bone.remove()
  • Fix: Bone.cast() should leave null as is
  • Fix: INSERT ... UPDATE with id = 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

04 Jan 01:07
Compare
Choose a tag to compare
  • Breaking: renamed to Jorma, as an acronym of JavaScript Object-Relational Mapping Alchemy

v0.1.8

31 Dec 13:53
Compare
Choose a tag to compare
  • 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 => className in association options
  • Docs: use jsdoc to generate docs/api
  • Docs: .include()
  • Docs: 中文文档

v0.1.7

22 Dec 07:43
Compare
Choose a tag to compare
  • Refactor: { type: 'op', name: 'as' } renamed to { type: 'alias' }
  • New: { type: 'mod' } for modifier, currently only DISTINCT is recognized
  • New: unary operators like ! and NOT
  • New: IS and IS NOT
  • Fix: logic operator precendences
  • Fix: polymorphic hasMany({ through }) relations
  • Fix: dispatching multiple results with joins correctly

v0.1.6

21 Dec 01:15
Compare
Choose a tag to compare
  • New: proper .first, .last, .all, and .get(index)
  • Fix: accept Date, boolean, and Set values
  • Fix: Model.unscoped
  • Fix: Model.remove({}, true) should be unscoped

Also added a few test cases about Date functions.

v0.1.5

20 Dec 02:12
Compare
Choose a tag to compare
v0.1.5 Pre-release
Pre-release
  • 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

20 Dec 02:11
Compare
Choose a tag to compare
v0.1.4 Pre-release
Pre-release
  • 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

17 Dec 16:54
Compare
Choose a tag to compare
v0.1.3 Pre-release
Pre-release

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.