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

Commit 93b843be by Mick Hansen

[ci skip] docs on docs on docs

1 parent 1040da6b
Showing with 10 additions and 2 deletions
...@@ -719,6 +719,7 @@ module.exports = (function() { ...@@ -719,6 +719,7 @@ module.exports = (function() {
* *
* @param {Object} [options={}] * @param {Object} [options={}]
* @param {Boolean} [options.force=false] If set to true, paranoid models will actually be deleted * @param {Boolean} [options.force=false] If set to true, paranoid models will actually be deleted
* @param {Transaction} [options.transaction]
* *
* @return {Promise<undefined>} * @return {Promise<undefined>}
*/ */
...@@ -760,6 +761,7 @@ module.exports = (function() { ...@@ -760,6 +761,7 @@ module.exports = (function() {
* Restore the row corresponding to this instance. Only available for paranoid models. * Restore the row corresponding to this instance. Only available for paranoid models.
* *
* @param {Object} [options={}] * @param {Object} [options={}]
* @param {Transaction} [options.transaction]
* *
* @return {Promise<undefined>} * @return {Promise<undefined>}
*/ */
......
...@@ -662,8 +662,8 @@ module.exports = (function() { ...@@ -662,8 +662,8 @@ module.exports = (function() {
* @param {String|Array|Sequelize.fn} [options.order] Specifies an ordering. If a string is provided, it will be esacped. Using an array, you can provide several columns / functions to order by. Each element can be further wrapped in a two-element array. The first element is the column / function to order by, the second is the direction. For example: `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. * @param {String|Array|Sequelize.fn} [options.order] Specifies an ordering. If a string is provided, it will be esacped. Using an array, you can provide several columns / functions to order by. Each element can be further wrapped in a two-element array. The first element is the column / function to order by, the second is the direction. For example: `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not.
* @param {Number} [options.limit] * @param {Number} [options.limit]
* @param {Number} [options.offset] * @param {Number} [options.offset]
* @param {Transaction} [options.transaction]
* @param {Object} [queryOptions] Set the query options, e.g. raw, specifying that you want raw data instead of built Instances. See sequelize.query for options * @param {Object} [queryOptions] Set the query options, e.g. raw, specifying that you want raw data instead of built Instances. See sequelize.query for options
* @param {Transaction} [queryOptions.transaction]
* @param {String} [queryOptions.lock] Lock the selected rows in either share or update mode. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. See [transaction.LOCK for an example](https://github.com/sequelize/sequelize/wiki/API-Reference-Transaction#LOCK) * @param {String} [queryOptions.lock] Lock the selected rows in either share or update mode. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. See [transaction.LOCK for an example](https://github.com/sequelize/sequelize/wiki/API-Reference-Transaction#LOCK)
* *
* @see {Sequelize#query} * @see {Sequelize#query}
...@@ -751,6 +751,7 @@ module.exports = (function() { ...@@ -751,6 +751,7 @@ module.exports = (function() {
* Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single instance. * Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single instance.
* *
* @param {Object|Number} [options] A hash of options to describe the scope of the search, or a number to search by id. * @param {Object|Number} [options] A hash of options to describe the scope of the search, or a number to search by id.
* @param {Transaction} [options.transaction]
* @param {Object} [queryOptions] * @param {Object} [queryOptions]
* *
* @see {Model#findAll} for an explanation of options and queryOptions * @see {Model#findAll} for an explanation of options and queryOptions
...@@ -790,6 +791,7 @@ module.exports = (function() { ...@@ -790,6 +791,7 @@ module.exports = (function() {
* @param {Object} [options] Query options. See sequelize.query for full options * @param {Object} [options] Query options. See sequelize.query for full options
* @param {DataType|String} [options.dataType] The type of the result. If `field` is a field in this Model, the default will be the type of that field, otherwise defaults to float. * @param {DataType|String} [options.dataType] The type of the result. If `field` is a field in this Model, the default will be the type of that field, otherwise defaults to float.
* @param {boolean} [options.distinct] Applies DISTINCT to the field being aggregated over * @param {boolean} [options.distinct] Applies DISTINCT to the field being aggregated over
* @param {Transaction} [options.transaction]
* *
* @return {Promise<options.dataType>} * @return {Promise<options.dataType>}
*/ */
...@@ -1374,6 +1376,7 @@ module.exports = (function() { ...@@ -1374,6 +1376,7 @@ module.exports = (function() {
/** /**
* Delete multiple instances, or set their deletedAt timestamp to the current time if `paranoid` is enabled. * Delete multiple instances, or set their deletedAt timestamp to the current time if `paranoid` is enabled.
* *
* @param {Object} options
* @param {Object} [options.where] Filter the destroy * @param {Object} [options.where] Filter the destroy
* @param {Boolean} [options.hooks=true] Run before / after bulk destroy hooks? * @param {Boolean} [options.hooks=true] Run before / after bulk destroy hooks?
* @param {Boolean} [options.individualHooks=false] If set to true, destroy will find all records within the where parameter and will execute before / after bulkDestroy hooks on each row * @param {Boolean} [options.individualHooks=false] If set to true, destroy will find all records within the where parameter and will execute before / after bulkDestroy hooks on each row
...@@ -1381,7 +1384,7 @@ module.exports = (function() { ...@@ -1381,7 +1384,7 @@ module.exports = (function() {
* @param {Boolean} [options.force=false] Delete instead of setting deletedAt to current timestamp (only applicable if `paranoid` is enabled) * @param {Boolean} [options.force=false] Delete instead of setting deletedAt to current timestamp (only applicable if `paranoid` is enabled)
* @param {Boolean} [options.truncate=false] If set to true, dialects that support it will use TRUNCATE instead of DELETE FROM. If a table is truncated the where and limit options are ignored * @param {Boolean} [options.truncate=false] If set to true, dialects that support it will use TRUNCATE instead of DELETE FROM. If a table is truncated the where and limit options are ignored
* @param {Boolean} [options.cascade=false] Only used in conjuction with TRUNCATE. Truncates all tables that have foreign-key references to the named table, or to any tables added to the group due to CASCADE. * @param {Boolean} [options.cascade=false] Only used in conjuction with TRUNCATE. Truncates all tables that have foreign-key references to the named table, or to any tables added to the group due to CASCADE.
* * @param {Transaction} [options.transaction]
* @return {Promise<undefined>} * @return {Promise<undefined>}
*/ */
Model.prototype.destroy = function(options) { Model.prototype.destroy = function(options) {
...@@ -1444,10 +1447,12 @@ module.exports = (function() { ...@@ -1444,10 +1447,12 @@ module.exports = (function() {
/** /**
* Restore multiple instances if `paranoid` is enabled. * Restore multiple instances if `paranoid` is enabled.
* *
* @param {Object} options
* @param {Object} [options.where] Filter the restore * @param {Object} [options.where] Filter the restore
* @param {Boolean} [options.hooks=true] Run before / after bulk restore hooks? * @param {Boolean} [options.hooks=true] Run before / after bulk restore hooks?
* @param {Boolean} [options.individualHooks=false] If set to true, restore will find all records within the where parameter and will execute before / after bulkRestore hooks on each row * @param {Boolean} [options.individualHooks=false] If set to true, restore will find all records within the where parameter and will execute before / after bulkRestore hooks on each row
* @param {Number} [options.limit] How many rows to undelete * @param {Number} [options.limit] How many rows to undelete
* @param {Transaction} [options.transaction]
* *
* @return {Promise<undefined>} * @return {Promise<undefined>}
*/ */
...@@ -1517,6 +1522,7 @@ module.exports = (function() { ...@@ -1517,6 +1522,7 @@ module.exports = (function() {
* @param {Boolean} [options.individualHooks=false] Run before / after update hooks? * @param {Boolean} [options.individualHooks=false] Run before / after update hooks?
* @param {Boolean} [options.returning=false] Return the affected rows (only for postgres) * @param {Boolean} [options.returning=false] Return the affected rows (only for postgres)
* @param {Number} [options.limit] How many rows to update (only for mysql and mariadb) * @param {Number} [options.limit] How many rows to update (only for mysql and mariadb)
* @param {Transaction} [options.transaction]
* *
* @return {Promise<Array<affectedCount,affectedRows>>} * @return {Promise<Array<affectedCount,affectedRows>>}
*/ */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!