不要怂,就是干,撸起袖子干!

Commit 9848f6a1 by Mick Hansen

Merge pull request #5149 from sushantdhiman/fix-docs

Fixed various docs issues
2 parents 0514149f b28fb18d
...@@ -65,7 +65,7 @@ module.exports = { ...@@ -65,7 +65,7 @@ module.exports = {
} }
``` ```
The passed `queryInterface` object can be used to modify the database. The `Sequelize` object stores the available data types such as `STRING` or `INTEGER`. The third parameter is a callback function which needs to be called once everything was executed. The first parameter of the callback function can be used to pass a possible error. In that case, the migration will be marked as failed. Here is some code: The passed `queryInterface` object can be used to modify the database. The `Sequelize` object stores the available data types such as `STRING` or `INTEGER`. Function `up` or `down` should return a `Promise`. Here is some code:
```js ```js
module.exports = { module.exports = {
......
...@@ -90,7 +90,9 @@ var sequelize = new Sequelize('database', 'username', 'password', { ...@@ -90,7 +90,9 @@ var sequelize = new Sequelize('database', 'username', 'password', {
freezeTableName: false, freezeTableName: false,
syncOnAssociation: true, syncOnAssociation: true,
charset: 'utf8', charset: 'utf8',
collate: 'utf8_general_ci', dialectOptions: {
collate: 'utf8_general_ci'
},
classMethods: {method1: function() {}}, classMethods: {method1: function() {}},
instanceMethods: {method2: function() {}}, instanceMethods: {method2: function() {}},
timestamps: true timestamps: true
......
...@@ -770,7 +770,8 @@ Instance.prototype.hookValidate = function(options) { ...@@ -770,7 +770,8 @@ Instance.prototype.hookValidate = function(options) {
}; };
/** /**
* This is the same as calling `set` and then calling `save`. * This is the same as calling `set` and then calling `save` but it only saves the
* exact values passed to it, making it more atomic and safer.
* *
* @see {Instance#set} * @see {Instance#set}
* @see {Instance#save} * @see {Instance#save}
......
...@@ -1552,7 +1552,7 @@ Model.prototype.aggregate = function(attribute, aggregateFunction, options) { ...@@ -1552,7 +1552,7 @@ Model.prototype.aggregate = function(attribute, aggregateFunction, options) {
* @param {Object} [options] * @param {Object} [options]
* @param {Object} [options.where] A hash of search attributes. * @param {Object} [options.where] A hash of search attributes.
* @param {Object} [options.include] Include options. See `find` for details * @param {Object} [options.include] Include options. See `find` for details
* @param {boolean} [options.distinct] Apply COUNT(DISTINCT(col)) * @param {boolean} [options.distinct] Apply COUNT(DISTINCT(col)) on primary key, `Model.aggregate` should be used for other columns
* @param {Object} [options.attributes] Used in conjunction with `group` * @param {Object} [options.attributes] Used in conjunction with `group`
* @param {Object} [options.group] For creating complex counts. Will return multiple rows as needed. * @param {Object} [options.group] For creating complex counts. Will return multiple rows as needed.
* @param {Transaction} [options.transaction] Transaction to run query under * @param {Transaction} [options.transaction] Transaction to run query under
......
...@@ -251,7 +251,6 @@ Sequelize.prototype.Sequelize = Sequelize; ...@@ -251,7 +251,6 @@ Sequelize.prototype.Sequelize = Sequelize;
/** /**
* A reference to sequelize utilities. Most users will not need to use these utils directly. However, you might want to use `Sequelize.Utils._`, which is a reference to the lodash library, if you don't already have it imported in your project. * A reference to sequelize utilities. Most users will not need to use these utils directly. However, you might want to use `Sequelize.Utils._`, which is a reference to the lodash library, if you don't already have it imported in your project.
* @property Utils * @property Utils
* @see {Utils}
*/ */
Sequelize.prototype.Utils = Sequelize.Utils = Utils; Sequelize.prototype.Utils = Sequelize.Utils = Utils;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!