Node.js 的 ORM 框架,?Sequelize 2.0.0 正式發布!
Sequelize.js 提供對 MySQL,MariaDB,SQLite 和 PostgreSQL 數據庫的簡單訪問,通過映射數據庫條目到對象,或者對象到數據庫條目。簡而言之,就是 ORM(Object-Relational-Mapper)。Sequelize.js 完全是使用 JavaScript 編寫,適用于 Node.js 的環境。
Sequelize 2.0.0 正式發布,此版本現已提供下載(ZIP),相比 Sequelize 2.0.0 RC8 更新內容如下:
-
[BUG] 修復
field
支持increment
和decrement
相關問題 -
[FEATURE/BUG] Raw queries always return all results (including affected rows etc). This means you should change all promise listeners on
sequelize.query
to use.spread
instead of.then
, unless you are passing a query type. -
[BUG] Support for composite primary keys in upsert #3065
-
[BUG] Support for
field
in upsert -
[FEATURE] 支持在 MySQL 中設置一個初始自動增長選項 #3076
-
[FEATURE] 測試覆蓋 Node.js 0.12 和 io.js 1.x
向后兼容改進:
-
The default query type for
sequelize.query
is nowRAW
- this means that two arguments (results and metadata) will be returned by default and you should use.spread
-
The 4th argument to
sequelize.query
has been deprecated in favor ofoptions.replacements
來自:http://www.oschina.net/news/59583/sequelize-2-0-0