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