Skip to content

Commit

Permalink
docs: v5.0.0-beta.17
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantdhiman committed Mar 13, 2019
1 parent 4478d74 commit bc6c133
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 232 deletions.
1 change: 0 additions & 1 deletion .esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"./docs/raw-queries.md",
"./docs/migrations.md",
"./docs/upgrade-to-v5.md",
"./docs/upgrade-to-v4.md",
"./docs/legacy.md",
"./docs/whos-using.md",
"./docs/legal.md"
Expand Down
6 changes: 4 additions & 2 deletions docs/ROUTER
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
301 /en/latest /
301 /en/latest/ /

301 /en/latest/docs/getting-started/ /manual/installation/getting-started.html
301 /en/latest/docs/:section/ /manual/tutorial/:section.html
301 /en/latest/docs/getting-started/ /manual/getting-started.html
301 /en/latest/docs/:section/ /manual/:section.html

301 /en/latest/api/sequelize/ /class/lib/sequelize.js~Sequelize.html
301 /en/latest/api/model/ /class/lib/model.js~Model.html
Expand All @@ -22,3 +22,5 @@
301 /en/latest/api/datatypes/ /variable/index.html#static-variable-DataTypes
301 /en/latest/api/deferrable/ /variable/index.html#static-variable-Deferrable
301 /en/latest/api/errors/ /class/lib/errors/index.js~BaseError.html

302 /manual/tutorial/:section.html /manual/:section.html
2 changes: 1 addition & 1 deletion docs/associations.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ project.setUsers([user1, user2]).then(() => {
## Advance Concepts

### Scopes
This section concerns association scopes. For a definition of association scopes vs. scopes on associated models, see [Scopes](/manual/tutorial/scopes.html).
This section concerns association scopes. For a definition of association scopes vs. scopes on associated models, see [Scopes](/manual/scopes.html).

Association scopes allow you to place a scope (a set of default attributes for `get` and `create`) on the association. Scopes can be placed both on the associated model (the target of the association), and on the through table for n:m relations.

Expand Down
4 changes: 2 additions & 2 deletions docs/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Timeline.create({ range: [-Infinity, new Date(Date.UTC(2016, 0, 1))] });

# Extending datatypes

Most likely the type you are trying to implement is already included in [DataTypes](/manual/tutorial/data-types.html). If a new datatype is not included, this manual will show how to write it yourself.
Most likely the type you are trying to implement is already included in [DataTypes](/manual/data-types.html). If a new datatype is not included, this manual will show how to write it yourself.

Sequelize doesn't create new datatypes in the database. This tutorial explains how to make Sequelize recognize new datatypes and assumes that those new datatypes are already created in the database.

Expand Down Expand Up @@ -271,7 +271,7 @@ modules.exports = function sequelizeAdditions(Sequelize) {

// Mandatory, create a postgres-specific child datatype with its own parse
// method. The parser will be dynamically mapped to the OID of pg_new_type.
PgTypes = DataTypes.postgres
PgTypes = DataTypes.postgres

PgTypes.NEWTYPE = function NEWTYPE() {
if (!(this instanceof PgTypes.NEWTYPE)) return new PgTypes.NEWTYPE();
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ User.findAll().then(users => {
})
```

You can read more about finder functions on models like `.findAll()` at [Data retrieval](/manual/tutorial/models-usage.html#data-retrieval-finders) or how to do specific queries like `WHERE` and `JSONB` at [Querying](/manual/tutorial/querying.html).
You can read more about finder functions on models like `.findAll()` at [Data retrieval](/manual/models-usage.html#data-retrieval-finders) or how to do specific queries like `WHERE` and `JSONB` at [Querying](/manual/querying.html).

### Application wide model options

Expand Down
6 changes: 3 additions & 3 deletions docs/models-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Sequelize.Deferrable.NOT
```

The last option is the default in PostgreSQL and won't allow you to dynamically change
the rule in a transaction. See [the transaction section](/manual/tutorial/transactions.html#options) for further information.
the rule in a transaction. See [the transaction section](/manual/transactions.html#options) for further information.

## Getters & setters

Expand Down Expand Up @@ -666,7 +666,7 @@ sequelize.define('user', {}, {
```


[0]: /manual/tutorial/models-definition.html#configuration
[1]: /manual/tutorial/data-types.html
[0]: /manual/models-definition.html#configuration
[1]: /manual/data-types.html
[3]: https://github.com/chriso/validator.js
[5]: /docs/final/misc#asynchronicity
2 changes: 1 addition & 1 deletion docs/models-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Data retrieval / Finders

Finder methods are intended to query data from the database. They do *not* return plain objects but instead return model instances. Because finder methods return model instances you can call any model instance member on the result as described in the documentation for [*instances*](/manual/tutorial/instances.html).
Finder methods are intended to query data from the database. They do *not* return plain objects but instead return model instances. Because finder methods return model instances you can call any model instance member on the result as described in the documentation for [*instances*](/manual/instances.html).

In this document we'll explore what finder methods can do:

Expand Down
2 changes: 1 addition & 1 deletion docs/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Op = Sequelize.Op
Range types can be queried with all supported operators.

Keep in mind, the provided range value can
[define the bound inclusion/exclusion](/manual/tutorial/data-types.html#range-types)
[define the bound inclusion/exclusion](/manual/data-types.html#range-types)
as well.

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ this.Post.hasMany(this.Comment, {
});
```
When calling `post.getComments()`, this will automatically add `WHERE commentable = 'post'`. Similarly, when adding new comments to a post, `commentable` will automagically be set to `'post'`. The association scope is meant to live in the background without the programmer having to worry about it - it cannot be disabled. For a more complete polymorphic example, see [Association scopes](/manual/tutorial/associations.html#scopes)
When calling `post.getComments()`, this will automatically add `WHERE commentable = 'post'`. Similarly, when adding new comments to a post, `commentable` will automagically be set to `'post'`. The association scope is meant to live in the background without the programmer having to worry about it - it cannot be disabled. For a more complete polymorphic example, see [Association scopes](/manual/associations.html#scopes)
Consider then, that Post has a default scope which only shows active posts: `where: { active: true }`. This scope lives on the associated model (Post), and not on the association like the `commentable` scope did. Just like the default scope is applied when calling `Post.findAll()`, it is also applied when calling `User.getPosts()` - this will only return the active posts for that user.
Expand Down
214 changes: 0 additions & 214 deletions docs/upgrade-to-v4.md

This file was deleted.

42 changes: 40 additions & 2 deletions docs/upgrade-to-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Sequelize v5 will only support Node 6 and up [#9015](https://github.com/sequeliz

With v4 you started to get a deprecation warning `String based operators are now deprecated`. Also concept of operators was introduced. These operators are Symbols which prevent hash injection attacks.

http://docs.sequelizejs.com/manual/tutorial/querying.html#operators-security
http://docs.sequelizejs.com/manual/querying.html#operators-security

**With v5**

Expand Down Expand Up @@ -181,7 +181,7 @@ Model.findAll({

#### MSSQL

- Sequelize now works with `tedious@6.0.0`, this means old `dialectOptions` has to be updated to match their new format. Please refer to tedious [documentation](http://tediousjs.github.io/tedious/api-connection.html#function_newConnection). An example of new `dialectOptions` is given below
- Sequelize now works with `tedious >= 6.0.0`. Old `dialectOptions` has to be updated to match their new format. Please refer to tedious [documentation](http://tediousjs.github.io/tedious/api-connection.html#function_newConnection). An example of new `dialectOptions` is given below

```json
dialectOptions: {
Expand Down Expand Up @@ -213,6 +213,44 @@ dialectOptions: {

## Changelog

### 5.0.0-beta.17

- fix(build): default null for multiple primary keys
- fix(util): improve performance of classToInvokable [#10534](https://github.com/sequelize/sequelize/pull/10534)
- fix(model/update): propagate paranoid to individualHooks query [#10369](https://github.com/sequelize/sequelize/pull/10369)
- fix(association): use minimal select for hasAssociation [#10529](https://github.com/sequelize/sequelize/pull/10529)
- fix(query-interface): reject with error for describeTable [#10528](https://github.com/sequelize/sequelize/pull/10528)
- fix(model): throw for invalid include type [#10527](https://github.com/sequelize/sequelize/pull/10527)
- fix(types): additional options for db.query and add missing retry [#10512](https://github.com/sequelize/sequelize/pull/10512)
- fix(query): don't prepare options & sql for every retry [#10498](https://github.com/sequelize/sequelize/pull/10498)
- feat: expose Sequelize.BaseError
- feat: upgrade to tedious@6.0.0 [#10494](https://github.com/sequelize/sequelize/pull/10494)
- feat(sqlite/query-generator): support restart identity for truncate-table [#10522](https://github.com/sequelize/sequelize/pull/10522)
- feat(data-types): handle numbers passed as objects [#10492](https://github.com/sequelize/sequelize/pull/10492)
- feat(types): enabled string association [#10481](https://github.com/sequelize/sequelize/pull/10481)
- feat(postgres): allow customizing client_min_messages [#10448](https://github.com/sequelize/sequelize/pull/10448)
- refactor(data-types): move to classes [#10495](https://github.com/sequelize/sequelize/pull/10495)
- docs(legacy): fix N:M example [#10509](https://github.com/sequelize/sequelize/pull/10509)
- docs(migrations): use migrationStorageTableSchema [#10417](https://github.com/sequelize/sequelize/pull/10417)
- docs(hooks): add documentation for connection hooks [#10410](https://github.com/sequelize/sequelize/pull/10410)
- docs(addIndex): concurrently option [#10409](https://github.com/sequelize/sequelize/pull/10409)
- docs(model): fix typo [#10405](https://github.com/sequelize/sequelize/pull/10405)
- docs(usage): fix broken link on Basic Usage [#10381](https://github.com/sequelize/sequelize/pull/10381)
- docs(package.json): add homepage [#10372](https://github.com/sequelize/sequelize/pull/10372)

### 5.0.0-beta.16

- feat: add typescript typings [#10287](https://github.com/sequelize/sequelize/pull/10117)
- fix(mysql): match with newlines in error message [#10320](https://github.com/sequelize/sequelize/pull/10320)
- fix(update): skips update when nothing to update [#10248](https://github.com/sequelize/sequelize/pull/10248)
- fix(utils): flattenObject for null values [#10293](https://github.com/sequelize/sequelize/pull/10293)
- fix(instance-validator): don't skip custom validators on null [#9143](https://github.com/sequelize/sequelize/pull/9143)
- docs(transaction): after save example [#10280](https://github.com/sequelize/sequelize/pull/10280)
- docs(query-generator): typo [#10277](https://github.com/sequelize/sequelize/pull/10277)
- refactor(errors): restructure [#10355](https://github.com/sequelize/sequelize/pull/10355)
- refactor(scope): documentation #9087 [#10312](https://github.com/sequelize/sequelize/pull/10312)
- refactor: cleanup association and spread use [#10276](https://github.com/sequelize/sequelize/pull/10276)

### 5.0.0-beta.16

- feat: add typescript typings [#10287](https://github.com/sequelize/sequelize/pull/10117)
Expand Down
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ sequelize.query('select 1 as `foo.bar.baz`').then(rows => {


[0]: /manual/installation/usage.html#options
[1]: /manual/tutorial/models-definition.html#configuration
[1]: /manual/models-definition.html#configuration
[2]: /class/lib/sequelize.js~Sequelize.html
[3]: /manual/tutorial/transactions.html
[3]: /manual/transactions.html
[4]: /variable/index.html#static-variable-QueryTypes
[5]: /class/lib/sequelize.js~Sequelize.html#instance-method-query

0 comments on commit bc6c133

Please sign in to comment.