发布于 2015-01-09 09:50:44 | 329 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Sequelize Node.js的ORM 框架

Sequelize.js 提供对 MySQL,MariaDB,SQLite 和 PostgreSQL 数据库的简单访问,通过映射数据库条目到对象,或者对象到数据库条目。简而言之,就是 ORM(Object-Relational-Mapper)。Sequelize.js 完全是使用 JavaScript 编写,适用于 Node.js 的环境。


Sequelize.js 提供对 MySQL,MariaDB,SQLite 和 PostgreSQL 数据库的简单访问,通过映射数据库条目到对象,或者对象到数据库条目。简而言之,就是 ORM(Object-Relational-Mapper)。Sequelize.js 完全是使用 JavaScript 编写,适用于 Node.js 的环境。

Sequelize 2.0.0RC7 发布,此版本现已提供下载:Sequelize 3.0.0.RC7.zip,主要更新内容如下:

  • [FEATURE] Throw an error if no where clause is given to Model.destroy().

  • [BUG] Fixed issue with order: sequelize.literal('string')

  • [FEATURE] add clone: true support to .get(). Is needed when using delete on values from a .get() (toJSON(), this.values). (.get() is just a reference to the values for performance reasons when there's no custom getters or includes)

  • [FEATURE] add sequelize.escape(value) convenience method

  • [BUG] Fixes crash with findAll({include: [Model], order: sequelize.literal()})

  • [FEATURE] Now possible to pass createdAt and updatedAt values to Model.create/Model.bulkCreate when using silent: true (when importing datasets with existing timestamps)

  • [FEATURE] instance.update() using default fields will now automatically also save and validate values provided via beforeUpdate hooks

  • [BUG] Fixed bad SQL when updating a JSON attribute with a different field

  • [BUG] Fixed issue with creating and updating values of a DataTypes.ARRAY(DataTypes.JSON) attribute

  • [BUG] Model.bulkCreate([{}], {returning: true}) will now correctly result in instances with primary key values.

  • [BUG] instance.save() with fields: [] (as a result of .changed() being []) will no result in a noop instead of an empty update query.

  • [BUG] Fixed case where findOrCreate could return [null, true] when given a defaults value that triggered a unique constraint error.

向后兼容改进

  • instance.update() using default fields will now automatically also save and validate values provided via beforeUpdate hooks

  • Sequelize no longer supports case insensitive mysql enums

更多内容请看更新日志



历史版本 :
Sequelize v4.31.0 发布,Node.js 的 ORM
Sequelize 4.29.1 和 4.29.2 发布,Node.js 的 ORM
Sequelize 4.29.0 发布,Node.js 的 ORM
Sequelize 4.28.0 发布,Node.js 的 ORM
Sequelize 4.22.16 和 4.23.0 发布,Node.js 的 ORM
Sequelize 4.22.9 发布,Node.js 的 ORM
Sequelize 4.22.2 和 4.22.3 和 4.22.4 发布,Node.js 的 ORM
Sequelize 4.15.0 发布,Node.js 的 ORM
Sequelize 4.14.0 发布,Node.js 的 ORM
Sequelize 4.13.16 和 4.13.17 发布,Node.js 的 ORM
Sequelize 4.13.11-15 发布,Node.js 的 ORM
Sequelize 4.13.9 和 4.13.10 发布,Node.js 的 ORM
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务