Node.js 的 ORM 框架,?Sequelize 2.0.0 正式發布!

jopen 9年前發布 | 5K 次閱讀 Node.js

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 支持 incrementdecrement 相關問題

  • [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 now RAW - 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 of options.replacements

Sequelize 2.0.0 完整改進內容請看更新日志

來自:http://www.oschina.net/news/59583/sequelize-2-0-0

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!