Skip to content

Releases: cyjake/leoric

v1.0.0 Victoria

24 Feb 02:59
Compare
Choose a tag to compare

Features added since 0.4.x:

  • schema definition related methods, such as createTable(), alterTable(), ...
  • migrations (premature) and Bone.sync()
  • a sequelize API adaptor to ease transition
  • SQLite support (without need of fork)
  • loggers

v0.5.3

22 Feb 09:06
ff55840
Compare
Choose a tag to compare
  • (kinda breaking) fix: differentiate opts.dialect & opts.client with a specific opts.sequelize
  • fix: prevent queries on models that are not connected yet

v0.5.2

21 Feb 08:22
Compare
Choose a tag to compare
  • Fix: drop the default and unused require('sqlite3')

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.