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

Commit 24b04a88 by Jan Aagaard Meier

[ci skip] 📝 Remove mention of callback from hooks api docs (promises are preferred)

1 parent e18aa0a5
Showing with 43 additions and 43 deletions
...@@ -111,7 +111,7 @@ A hook that is run after validation ...@@ -111,7 +111,7 @@ A hook that is run after validation
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance, options, callback(err) | | fn | Function | A callback function that is called with instance, options |
*** ***
...@@ -126,7 +126,7 @@ A hook that is run before creating a single instance ...@@ -126,7 +126,7 @@ A hook that is run before creating a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with attributes, options, callback(err) | | fn | Function | A callback function that is called with attributes, options |
*** ***
...@@ -141,7 +141,7 @@ A hook that is run after creating a single instance ...@@ -141,7 +141,7 @@ A hook that is run after creating a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with attributes, options, callback(err) | | fn | Function | A callback function that is called with attributes, options |
*** ***
...@@ -156,7 +156,7 @@ A hook that is run before destroying a single instance ...@@ -156,7 +156,7 @@ A hook that is run before destroying a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance, options, callback(err) | | fn | Function | A callback function that is called with instance, options |
__Aliases:__ beforeDelete __Aliases:__ beforeDelete
...@@ -172,7 +172,7 @@ A hook that is run after destroying a single instance ...@@ -172,7 +172,7 @@ A hook that is run after destroying a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance, options, callback(err) | | fn | Function | A callback function that is called with instance, options |
__Aliases:__ afterDelete __Aliases:__ afterDelete
...@@ -188,7 +188,7 @@ A hook that is run before updating a single instance ...@@ -188,7 +188,7 @@ A hook that is run before updating a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance, options, callback(err) | | fn | Function | A callback function that is called with instance, options |
*** ***
...@@ -203,7 +203,7 @@ A hook that is run after updating a single instance ...@@ -203,7 +203,7 @@ A hook that is run after updating a single instance
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance, options, callback(err) | | fn | Function | A callback function that is called with instance, options |
*** ***
...@@ -218,7 +218,7 @@ A hook that is run before creating instances in bulk ...@@ -218,7 +218,7 @@ A hook that is run before creating instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instances, options, callback(err) | | fn | Function | A callback function that is called with instances, options |
*** ***
...@@ -233,7 +233,7 @@ A hook that is run after creating instances in bulk ...@@ -233,7 +233,7 @@ A hook that is run after creating instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instances, options, callback(err) | | fn | Function | A callback function that is called with instances, options |
*** ***
...@@ -248,7 +248,7 @@ A hook that is run before destroying instances in bulk ...@@ -248,7 +248,7 @@ A hook that is run before destroying instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
__Aliases:__ beforeBulkDelete __Aliases:__ beforeBulkDelete
...@@ -264,7 +264,7 @@ A hook that is run after destroying instances in bulk ...@@ -264,7 +264,7 @@ A hook that is run after destroying instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
__Aliases:__ afterBulkDelete __Aliases:__ afterBulkDelete
...@@ -280,7 +280,7 @@ A hook that is run after updating instances in bulk ...@@ -280,7 +280,7 @@ A hook that is run after updating instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
*** ***
...@@ -295,7 +295,7 @@ A hook that is run after updating instances in bulk ...@@ -295,7 +295,7 @@ A hook that is run after updating instances in bulk
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
*** ***
...@@ -310,7 +310,7 @@ A hook that is run before a find (select) query ...@@ -310,7 +310,7 @@ A hook that is run before a find (select) query
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
*** ***
...@@ -325,7 +325,7 @@ A hook that is run before a find (select) query, after any { include: {all: ...} ...@@ -325,7 +325,7 @@ A hook that is run before a find (select) query, after any { include: {all: ...}
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
*** ***
...@@ -340,7 +340,7 @@ A hook that is run before a find (select) query, after all option parsing is com ...@@ -340,7 +340,7 @@ A hook that is run before a find (select) query, after all option parsing is com
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with options, callback(err) | | fn | Function | A callback function that is called with options |
*** ***
...@@ -355,7 +355,7 @@ A hook that is run after a find (select) query ...@@ -355,7 +355,7 @@ A hook that is run after a find (select) query
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with instance(s), options, callback(err) | | fn | Function | A callback function that is called with instance(s), option |
*** ***
...@@ -370,7 +370,7 @@ A hook that is run before a define call ...@@ -370,7 +370,7 @@ A hook that is run before a define call
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with attributes, options, callback(err) | | fn | Function | A callback function that is called with attributes, options |
*** ***
...@@ -385,7 +385,7 @@ A hook that is run after a define call ...@@ -385,7 +385,7 @@ A hook that is run after a define call
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with factory, callback(err) | | fn | Function | A callback function that is called with factory |
*** ***
...@@ -400,7 +400,7 @@ A hook that is run before Sequelize() call ...@@ -400,7 +400,7 @@ A hook that is run before Sequelize() call
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with config, options, callback(err) | | fn | Function | A callback function that is called with config, options |
*** ***
...@@ -415,7 +415,7 @@ A hook that is run after Sequelize() call ...@@ -415,7 +415,7 @@ A hook that is run after Sequelize() call
| Name | Type | Description | | Name | Type | Description |
| ---- | ---- | ----------- | | ---- | ---- | ----------- |
| name | String | | | name | String | |
| fn | Function | A callback function that is called with sequelize, callback(err) | | fn | Function | A callback function that is called with sequelize |
*** ***
......
...@@ -204,35 +204,35 @@ Hooks.hasHooks = Hooks.hasHook; ...@@ -204,35 +204,35 @@ Hooks.hasHooks = Hooks.hasHook;
/** /**
* A hook that is run before validation * A hook that is run before validation
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* @name beforeValidate * @name beforeValidate
*/ */
/** /**
* A hook that is run after validation * A hook that is run after validation
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* @name afterValidate * @name afterValidate
*/ */
/** /**
* A hook that is run before creating a single instance * A hook that is run before creating a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with attributes, options, callback(err) * @param {Function} fn A callback function that is called with attributes, options
* @name beforeCreate * @name beforeCreate
*/ */
/** /**
* A hook that is run after creating a single instance * A hook that is run after creating a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with attributes, options, callback(err) * @param {Function} fn A callback function that is called with attributes, options
* @name afterCreate * @name afterCreate
*/ */
/** /**
* A hook that is run before destroying a single instance * A hook that is run before destroying a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* *
* @name beforeDestroy * @name beforeDestroy
* @alias beforeDelete * @alias beforeDelete
...@@ -241,7 +241,7 @@ Hooks.hasHooks = Hooks.hasHook; ...@@ -241,7 +241,7 @@ Hooks.hasHooks = Hooks.hasHook;
/** /**
* A hook that is run after destroying a single instance * A hook that is run after destroying a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* *
* @name afterDestroy * @name afterDestroy
* @alias afterDelete * @alias afterDelete
...@@ -250,35 +250,35 @@ Hooks.hasHooks = Hooks.hasHook; ...@@ -250,35 +250,35 @@ Hooks.hasHooks = Hooks.hasHook;
/** /**
* A hook that is run before updating a single instance * A hook that is run before updating a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* @name beforeUpdate * @name beforeUpdate
*/ */
/** /**
* A hook that is run after updating a single instance * A hook that is run after updating a single instance
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance, options, callback(err) * @param {Function} fn A callback function that is called with instance, options
* @name afterUpdate * @name afterUpdate
*/ */
/** /**
* A hook that is run before creating instances in bulk * A hook that is run before creating instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instances, options, callback(err) * @param {Function} fn A callback function that is called with instances, options
* @name beforeBulkCreate * @name beforeBulkCreate
*/ */
/** /**
* A hook that is run after creating instances in bulk * A hook that is run after creating instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instances, options, callback(err) * @param {Function} fn A callback function that is called with instances, options
* @name afterBulkCreate * @name afterBulkCreate
*/ */
/** /**
* A hook that is run before destroying instances in bulk * A hook that is run before destroying instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* *
* @name beforeBulkDestroy * @name beforeBulkDestroy
* @alias beforeBulkDelete * @alias beforeBulkDelete
...@@ -287,7 +287,7 @@ Hooks.hasHooks = Hooks.hasHook; ...@@ -287,7 +287,7 @@ Hooks.hasHooks = Hooks.hasHook;
/** /**
* A hook that is run after destroying instances in bulk * A hook that is run after destroying instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* *
* @name afterBulkDestroy * @name afterBulkDestroy
* @alias afterBulkDelete * @alias afterBulkDelete
...@@ -296,70 +296,70 @@ Hooks.hasHooks = Hooks.hasHook; ...@@ -296,70 +296,70 @@ Hooks.hasHooks = Hooks.hasHook;
/** /**
* A hook that is run after updating instances in bulk * A hook that is run after updating instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* @name beforeBulkUpdate * @name beforeBulkUpdate
*/ */
/** /**
* A hook that is run after updating instances in bulk * A hook that is run after updating instances in bulk
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* @name afterBulkUpdate * @name afterBulkUpdate
*/ */
/** /**
* A hook that is run before a find (select) query * A hook that is run before a find (select) query
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* @name beforeFind * @name beforeFind
*/ */
/** /**
* A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded * A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* @name beforeFindAfterExpandIncludeAll * @name beforeFindAfterExpandIncludeAll
*/ */
/** /**
* A hook that is run before a find (select) query, after all option parsing is complete * A hook that is run before a find (select) query, after all option parsing is complete
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with options, callback(err) * @param {Function} fn A callback function that is called with options
* @name beforeFindAfterOptions * @name beforeFindAfterOptions
*/ */
/** /**
* A hook that is run after a find (select) query * A hook that is run after a find (select) query
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with instance(s), options, callback(err) * @param {Function} fn A callback function that is called with instance(s), options
* @name afterFind * @name afterFind
*/ */
/** /**
* A hook that is run before a define call * A hook that is run before a define call
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with attributes, options, callback(err) * @param {Function} fn A callback function that is called with attributes, options
* @name beforeDefine * @name beforeDefine
*/ */
/** /**
* A hook that is run after a define call * A hook that is run after a define call
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with factory, callback(err) * @param {Function} fn A callback function that is called with factory
* @name afterDefine * @name afterDefine
*/ */
/** /**
* A hook that is run before Sequelize() call * A hook that is run before Sequelize() call
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with config, options, callback(err) * @param {Function} fn A callback function that is called with config, options
* @name beforeInit * @name beforeInit
*/ */
/** /**
* A hook that is run after Sequelize() call * A hook that is run after Sequelize() call
* @param {String} name * @param {String} name
* @param {Function} fn A callback function that is called with sequelize, callback(err) * @param {Function} fn A callback function that is called with sequelize
* @name afterInit * @name afterInit
*/ */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!