@@ -120,7 +121,12 @@ const Post = sequelize.define('post', {}, {
...
@@ -120,7 +121,12 @@ const Post = sequelize.define('post', {}, {
## Promises
## Promises
Sequelize uses promises to control async control-flow. If you are unfamiliar with how promises work, don't worry, you can read up on them [here](https://github.com/wbinnssmith/awesome-promises) and [here](http://bluebirdjs.com/docs/why-promises.html).
Sequelize uses [Bluebird](http://bluebirdjs.com) promises to control async control-flow.
**Note:** _Sequelize use independent copy of Bluebird instance. You can access it using
`Sequelize.Promise` if you want to set any Bluebird specific options_
If you are unfamiliar with how promises work, don't worry, you can read up on them [here](http://bluebirdjs.com/docs/why-promises.html).
Basically, a promise represents a value which will be present at some point - "I promise you I will give you a result or an error at some point". This means that
Basically, a promise represents a value which will be present at some point - "I promise you I will give you a result or an error at some point". This means that
...
@@ -147,4 +153,4 @@ user = await User.findOne()
...
@@ -147,4 +153,4 @@ user = await User.findOne()
console.log(user.get('firstName'));
console.log(user.get('firstName'));
```
```
Once you've got the hang of what promises are and how they work, use the [bluebird API reference](http://bluebirdjs.com/docs/api-reference.html) as your go-to tool. In particular, you'll probably be using [`.all`](http://bluebirdjs.com/docs/api/promise.all.html) a lot.
Once you've got the hang of what promises are and how they work, use the [bluebird API reference](http://bluebirdjs.com/docs/api-reference.html) as your go-to tool. In particular, you'll probably be using [`.all`](http://bluebirdjs.com/docs/api/promise.all.html) a lot.
Sequelize is a promise-based ORM for Node.js v4 and up. It supports the dialects PostgreSQL, MySQL, SQLite and MSSQL and features solid transaction support, relations, read replication and
Sequelize is a promise-based ORM for Node.js v4 and up. It supports the dialects PostgreSQL, MySQL, SQLite and MSSQL and features solid transaction support, relations, read replication and more.
Please use [Getting Started](manual/installation/getting-started) to learn more. If you wish to learn about Sequelize API please use [API Reference](identifiers)