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

Commit 73b1246a by Simon Schick

refactor: updates

1 parent 7745bc2f
...@@ -369,8 +369,8 @@ class BelongsToMany extends Association { ...@@ -369,8 +369,8 @@ class BelongsToMany extends Association {
* {@link Model} for a full explanation of options * {@link Model} for a full explanation of options
* *
* @param {Model} instance instance * @param {Model} instance instance
* @param {Object} [options] find options * @param {object} [options] find options
* @param {Object} [options.where] An optional where clause to limit the associated models * @param {object} [options.where] An optional where clause to limit the associated models
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false
* @param {string} [options.schema] Apply a schema on the related model * @param {string} [options.schema] Apply a schema on the related model
* *
...@@ -438,8 +438,8 @@ class BelongsToMany extends Association { ...@@ -438,8 +438,8 @@ class BelongsToMany extends Association {
* Count everything currently associated with this, using an optional where clause. * Count everything currently associated with this, using an optional where clause.
* *
* @param {Model} instance instance * @param {Model} instance instance
* @param {Object} [options] find options * @param {object} [options] find options
* @param {Object} [options.where] An optional where clause to limit the associated models * @param {object} [options.where] An optional where clause to limit the associated models
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false
* *
* @returns {Promise<number>} * @returns {Promise<number>}
...@@ -464,7 +464,7 @@ class BelongsToMany extends Association { ...@@ -464,7 +464,7 @@ class BelongsToMany extends Association {
* *
* @param {Model} sourceInstance source instance to check for an association with * @param {Model} sourceInstance source instance to check for an association with
* @param {Model|Model[]|string[]|string|number[]|number} [instances] Can be an array of instances or their primary keys * @param {Model|Model[]|string[]|string|number[]|number} [instances] Can be an array of instances or their primary keys
* @param {Object} [options] Options passed to getAssociations * @param {object} [options] Options passed to getAssociations
* *
* @returns {Promise<boolean>} * @returns {Promise<boolean>}
*/ */
...@@ -508,9 +508,9 @@ class BelongsToMany extends Association { ...@@ -508,9 +508,9 @@ class BelongsToMany extends Association {
* *
* @param {Model} sourceInstance source instance to associate new instances with * @param {Model} sourceInstance source instance to associate new instances with
* @param {Model|Model[]|string[]|string|number[]|number} [newAssociatedObjects] A single instance or primary key, or a mixed array of persisted instances or primary keys * @param {Model|Model[]|string[]|string|number[]|number} [newAssociatedObjects] A single instance or primary key, or a mixed array of persisted instances or primary keys
* @param {Object} [options] Options passed to `through.findAll`, `bulkCreate`, `update` and `destroy` * @param {object} [options] Options passed to `through.findAll`, `bulkCreate`, `update` and `destroy`
* @param {Object} [options.validate] Run validation for the join model * @param {object} [options.validate] Run validation for the join model
* @param {Object} [options.through] Additional attributes for the join table. * @param {object} [options.through] Additional attributes for the join table.
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -611,9 +611,9 @@ class BelongsToMany extends Association { ...@@ -611,9 +611,9 @@ class BelongsToMany extends Association {
* *
* @param {Model} sourceInstance source instance to associate new instances with * @param {Model} sourceInstance source instance to associate new instances with
* @param {Model|Model[]|string[]|string|number[]|number} [newInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys * @param {Model|Model[]|string[]|string|number[]|number} [newInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys
* @param {Object} [options] Options passed to `through.findAll`, `bulkCreate` and `update` * @param {object} [options] Options passed to `through.findAll`, `bulkCreate` and `update`
* @param {Object} [options.validate] Run validation for the join model. * @param {object} [options.validate] Run validation for the join model.
* @param {Object} [options.through] Additional attributes for the join table. * @param {object} [options.through] Additional attributes for the join table.
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -700,7 +700,7 @@ class BelongsToMany extends Association { ...@@ -700,7 +700,7 @@ class BelongsToMany extends Association {
* *
* @param {Model} sourceInstance instance to un associate instances with * @param {Model} sourceInstance instance to un associate instances with
* @param {Model|Model[]|string|string[]|number|number[]} [oldAssociatedObjects] Can be an Instance or its primary key, or a mixed array of instances and primary keys * @param {Model|Model[]|string|string[]|number|number[]} [oldAssociatedObjects] Can be an Instance or its primary key, or a mixed array of instances and primary keys
* @param {Object} [options] Options passed to `through.destroy` * @param {object} [options] Options passed to `through.destroy`
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -719,9 +719,9 @@ class BelongsToMany extends Association { ...@@ -719,9 +719,9 @@ class BelongsToMany extends Association {
* Create a new instance of the associated model and associate it with this. * Create a new instance of the associated model and associate it with this.
* *
* @param {Model} sourceInstance source instance * @param {Model} sourceInstance source instance
* @param {Object} [values] values for target model * @param {object} [values] values for target model
* @param {Object} [options] Options passed to create and add * @param {object} [options] Options passed to create and add
* @param {Object} [options.through] Additional attributes for the join table * @param {object} [options.through] Additional attributes for the join table
* *
* @returns {Promise} * @returns {Promise}
*/ */
......
...@@ -115,7 +115,7 @@ class BelongsTo extends Association { ...@@ -115,7 +115,7 @@ class BelongsTo extends Association {
* Get the associated instance. * Get the associated instance.
* *
* @param {Model|Array<Model>} instances source instances * @param {Model|Array<Model>} instances source instances
* @param {Object} [options] find options * @param {object} [options] find options
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false. * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false.
* @param {string} [options.schema] Apply a schema on the related model * @param {string} [options.schema] Apply a schema on the related model
* *
...@@ -187,7 +187,7 @@ class BelongsTo extends Association { ...@@ -187,7 +187,7 @@ class BelongsTo extends Association {
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {?<Model>|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association. * @param {?<Model>|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association.
* @param {Object} [options={}] options passed to `this.save` * @param {object} [options={}] options passed to `this.save`
* @param {boolean} [options.save=true] Skip saving this after setting the foreign key if false. * @param {boolean} [options.save=true] Skip saving this after setting the foreign key if false.
* *
* @returns {Promise} * @returns {Promise}
...@@ -217,8 +217,8 @@ class BelongsTo extends Association { ...@@ -217,8 +217,8 @@ class BelongsTo extends Association {
* Create a new instance of the associated model and associate it with this. * Create a new instance of the associated model and associate it with this.
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {Object} [values={}] values to create associated model instance with * @param {object} [values={}] values to create associated model instance with
* @param {Object} [options={}] Options passed to `target.create` and setAssociation. * @param {object} [options={}] Options passed to `target.create` and setAssociation.
* *
* @see * @see
* {@link Model#create} for a full explanation of options * {@link Model#create} for a full explanation of options
......
...@@ -159,8 +159,8 @@ class HasMany extends Association { ...@@ -159,8 +159,8 @@ class HasMany extends Association {
* Get everything currently associated with this, using an optional where clause. * Get everything currently associated with this, using an optional where clause.
* *
* @param {Model|Array<Model>} instances source instances * @param {Model|Array<Model>} instances source instances
* @param {Object} [options] find options * @param {object} [options] find options
* @param {Object} [options.where] An optional where clause to limit the associated models * @param {object} [options.where] An optional where clause to limit the associated models
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false
* @param {string} [options.schema] Apply a schema on the related model * @param {string} [options.schema] Apply a schema on the related model
* *
...@@ -244,8 +244,8 @@ class HasMany extends Association { ...@@ -244,8 +244,8 @@ class HasMany extends Association {
* Count everything currently associated with this, using an optional where clause. * Count everything currently associated with this, using an optional where clause.
* *
* @param {Model} instance the source instance * @param {Model} instance the source instance
* @param {Object} [options] find & count options * @param {object} [options] find & count options
* @param {Object} [options.where] An optional where clause to limit the associated models * @param {object} [options.where] An optional where clause to limit the associated models
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false
* *
* @returns {Promise<number>} * @returns {Promise<number>}
...@@ -273,7 +273,7 @@ class HasMany extends Association { ...@@ -273,7 +273,7 @@ class HasMany extends Association {
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] Can be an array of instances or their primary keys * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] Can be an array of instances or their primary keys
* @param {Object} [options] Options passed to getAssociations * @param {object} [options] Options passed to getAssociations
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -314,8 +314,8 @@ class HasMany extends Association { ...@@ -314,8 +314,8 @@ class HasMany extends Association {
* *
* @param {Model} sourceInstance source instance to associate new instances with * @param {Model} sourceInstance source instance to associate new instances with
* @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] An array of persisted instances or primary key of instances to associate with this. Pass `null` or `undefined` to remove all associations. * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] An array of persisted instances or primary key of instances to associate with this. Pass `null` or `undefined` to remove all associations.
* @param {Object} [options] Options passed to `target.findAll` and `update`. * @param {object} [options] Options passed to `target.findAll` and `update`.
* @param {Object} [options.validate] Run validation for the join model * @param {object} [options.validate] Run validation for the join model
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -395,7 +395,7 @@ class HasMany extends Association { ...@@ -395,7 +395,7 @@ class HasMany extends Association {
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys
* @param {Object} [options] Options passed to `target.update`. * @param {object} [options] Options passed to `target.update`.
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -423,7 +423,7 @@ class HasMany extends Association { ...@@ -423,7 +423,7 @@ class HasMany extends Association {
* *
* @param {Model} sourceInstance instance to un associate instances with * @param {Model} sourceInstance instance to un associate instances with
* @param {Model|Model[]|string|string[]|number|number[]} [targetInstances] Can be an Instance or its primary key, or a mixed array of instances and primary keys * @param {Model|Model[]|string|string[]|number|number[]} [targetInstances] Can be an Instance or its primary key, or a mixed array of instances and primary keys
* @param {Object} [options] Options passed to `target.update` * @param {object} [options] Options passed to `target.update`
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -448,8 +448,8 @@ class HasMany extends Association { ...@@ -448,8 +448,8 @@ class HasMany extends Association {
* Create a new instance of the associated model and associate it with this. * Create a new instance of the associated model and associate it with this.
* *
* @param {Model} sourceInstance source instance * @param {Model} sourceInstance source instance
* @param {Object} [values] values for target model instance * @param {object} [values] values for target model instance
* @param {Object} [options] Options passed to `target.create` * @param {object} [options] Options passed to `target.create`
* *
* @returns {Promise} * @returns {Promise}
*/ */
......
...@@ -114,7 +114,7 @@ class HasOne extends Association { ...@@ -114,7 +114,7 @@ class HasOne extends Association {
* Get the associated instance. * Get the associated instance.
* *
* @param {Model|Array<Model>} instances source instances * @param {Model|Array<Model>} instances source instances
* @param {Object} [options] find options * @param {object} [options] find options
* @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false
* @param {string} [options.schema] Apply a schema on the related model * @param {string} [options.schema] Apply a schema on the related model
* *
...@@ -187,7 +187,7 @@ class HasOne extends Association { ...@@ -187,7 +187,7 @@ class HasOne extends Association {
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {?<Model>|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association. * @param {?<Model>|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association.
* @param {Object} [options] Options passed to getAssociation and `target.save` * @param {object} [options] Options passed to getAssociation and `target.save`
* *
* @returns {Promise} * @returns {Promise}
*/ */
...@@ -236,8 +236,8 @@ class HasOne extends Association { ...@@ -236,8 +236,8 @@ class HasOne extends Association {
* Create a new instance of the associated model and associate it with this. * Create a new instance of the associated model and associate it with this.
* *
* @param {Model} sourceInstance the source instance * @param {Model} sourceInstance the source instance
* @param {Object} [values={}] values to create associated model instance with * @param {object} [values={}] values to create associated model instance with
* @param {Object} [options] Options passed to `target.create` and setAssociation. * @param {object} [options] Options passed to `target.create` and setAssociation.
* *
* @see * @see
* {@link Model#create} for a full explanation of options * {@link Model#create} for a full explanation of options
......
...@@ -46,10 +46,10 @@ exports.addForeignKeyConstraints = addForeignKeyConstraints; ...@@ -46,10 +46,10 @@ exports.addForeignKeyConstraints = addForeignKeyConstraints;
* *
* @private * @private
* *
* @param {Object} association instance * @param {object} association instance
* @param {Object} obj Model prototype * @param {object} obj Model prototype
* @param {Array} methods Method names to inject * @param {Array} methods Method names to inject
* @param {Object} aliases Mapping between model and association method names * @param {object} aliases Mapping between model and association method names
* *
*/ */
function mixinMethods(association, obj, methods, aliases = {}) { function mixinMethods(association, obj, methods, aliases = {}) {
......
...@@ -157,7 +157,7 @@ class CITEXT extends ABSTRACT { ...@@ -157,7 +157,7 @@ class CITEXT extends ABSTRACT {
*/ */
class NUMBER extends ABSTRACT { class NUMBER extends ABSTRACT {
/** /**
* @param {Object} options type options * @param {object} options type options
* @param {string|number} [options.length] length of type, like `INT(4)` * @param {string|number} [options.length] length of type, like `INT(4)`
* @param {boolean} [options.zerofill] Is zero filled? * @param {boolean} [options.zerofill] Is zero filled?
* @param {boolean} [options.unsigned] Is unsigned? * @param {boolean} [options.unsigned] Is unsigned?
......
...@@ -65,7 +65,7 @@ class ConnectionManager { ...@@ -65,7 +65,7 @@ class ConnectionManager {
* @param {string} moduleName Name of dialect module to lookup * @param {string} moduleName Name of dialect module to lookup
* *
* @private * @private
* @returns {Object} * @returns {object}
*/ */
_loadDialectModule(moduleName) { _loadDialectModule(moduleName) {
try { try {
...@@ -249,7 +249,7 @@ class ConnectionManager { ...@@ -249,7 +249,7 @@ class ConnectionManager {
* Get connection from pool. It sets database version if it's not already set. * Get connection from pool. It sets database version if it's not already set.
* Call pool.acquire to get a connection * Call pool.acquire to get a connection
* *
* @param {Object} [options] Pool options * @param {object} [options] Pool options
* @param {string} [options.type] Set which replica to use. Available options are `read` and `write` * @param {string} [options.type] Set which replica to use. Available options are `read` and `write`
* @param {boolean} [options.useMaster=false] Force master or write replica to get connection from * @param {boolean} [options.useMaster=false] Force master or write replica to get connection from
* *
......
...@@ -92,9 +92,9 @@ class QueryGenerator { ...@@ -92,9 +92,9 @@ class QueryGenerator {
* Returns an insert into command * Returns an insert into command
* *
* @param {string} table * @param {string} table
* @param {Object} valueHash attribute value pairs * @param {object} valueHash attribute value pairs
* @param {Object} modelAttributes * @param {object} modelAttributes
* @param {Object} [options] * @param {object} [options]
* *
* @private * @private
*/ */
...@@ -253,9 +253,9 @@ class QueryGenerator { ...@@ -253,9 +253,9 @@ class QueryGenerator {
* Returns an insert into command for multiple values. * Returns an insert into command for multiple values.
* *
* @param {string} tableName * @param {string} tableName
* @param {Object} fieldValueHashes * @param {object} fieldValueHashes
* @param {Object} options * @param {object} options
* @param {Object} fieldMappedAttributes * @param {object} fieldMappedAttributes
* *
* @private * @private
*/ */
...@@ -313,10 +313,10 @@ class QueryGenerator { ...@@ -313,10 +313,10 @@ class QueryGenerator {
* Returns an update query * Returns an update query
* *
* @param {string} tableName * @param {string} tableName
* @param {Object} attrValueHash * @param {object} attrValueHash
* @param {Object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer * @param {object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer
* @param {Object} options * @param {object} options
* @param {Object} attributes * @param {object} attributes
* *
* @private * @private
*/ */
...@@ -427,10 +427,10 @@ class QueryGenerator { ...@@ -427,10 +427,10 @@ class QueryGenerator {
* *
* @param {string} operator String with the arithmetic operator (e.g. '+' or '-') * @param {string} operator String with the arithmetic operator (e.g. '+' or '-')
* @param {string} tableName Name of the table * @param {string} tableName Name of the table
* @param {Object} attrValueHash A hash with attribute-value-pairs * @param {object} attrValueHash A hash with attribute-value-pairs
* @param {Object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer * @param {object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer
* @param {Object} options * @param {object} options
* @param {Object} attributes * @param {object} attributes
*/ */
arithmeticQuery(operator, tableName, attrValueHash, where, options, attributes = {}) { arithmeticQuery(operator, tableName, attrValueHash, where, options, attributes = {}) {
options = { options = {
...@@ -896,7 +896,7 @@ class QueryGenerator { ...@@ -896,7 +896,7 @@ class QueryGenerator {
/** /**
* Quote table name with optional alias and schema attribution * Quote table name with optional alias and schema attribution
* *
* @param {string|Object} param table string or object * @param {string|object} param table string or object
* @param {string|boolean} alias alias name * @param {string|boolean} alias alias name
* *
* @returns {string} * @returns {string}
...@@ -1917,7 +1917,7 @@ class QueryGenerator { ...@@ -1917,7 +1917,7 @@ class QueryGenerator {
/** /**
* Returns an SQL fragment for adding result constraints. * Returns an SQL fragment for adding result constraints.
* *
* @param {Object} options An object with selectQuery options. * @param {object} options An object with selectQuery options.
* @returns {string} The generated sql query. * @returns {string} The generated sql query.
* @private * @private
*/ */
......
...@@ -25,7 +25,7 @@ const postgresReservedWords = 'all,analyse,analyze,and,any,array,as,asc,asymmetr ...@@ -25,7 +25,7 @@ const postgresReservedWords = 'all,analyse,analyze,and,any,array,as,asc,asymmetr
* *
* @param {string} dialect Dialect name * @param {string} dialect Dialect name
* @param {string} identifier Identifier to quote * @param {string} identifier Identifier to quote
* @param {Object} [options] * @param {object} [options]
* @param {boolean} [options.force=false] * @param {boolean} [options.force=false]
* @param {boolean} [options.quoteIdentifiers=true] * @param {boolean} [options.quoteIdentifiers=true]
* *
......
...@@ -7,7 +7,7 @@ const TransactionQueries = { ...@@ -7,7 +7,7 @@ const TransactionQueries = {
* Returns a query that sets the transaction isolation level. * Returns a query that sets the transaction isolation level.
* *
* @param {string} value The isolation level. * @param {string} value The isolation level.
* @param {Object} options An object with options. * @param {object} options An object with options.
* @returns {string} The generated sql query. * @returns {string} The generated sql query.
* @private * @private
*/ */
......
...@@ -38,10 +38,10 @@ class AbstractQuery { ...@@ -38,10 +38,10 @@ class AbstractQuery {
* skipValueReplace: bool, do not replace (but do unescape $$). Check correct syntax and if all values are available * skipValueReplace: bool, do not replace (but do unescape $$). Check correct syntax and if all values are available
* *
* @param {string} sql * @param {string} sql
* @param {Object|Array} values * @param {object|Array} values
* @param {string} dialect * @param {string} dialect
* @param {Function} [replacementFunc] * @param {Function} [replacementFunc]
* @param {Object} [options] * @param {object} [options]
* @private * @private
*/ */
static formatBindParameters(sql, values, dialect, replacementFunc, options = {}) { static formatBindParameters(sql, values, dialect, replacementFunc, options = {}) {
...@@ -382,8 +382,8 @@ class AbstractQuery { ...@@ -382,8 +382,8 @@ class AbstractQuery {
* ] * ]
* *
* @param {Array} rows * @param {Array} rows
* @param {Object} includeOptions * @param {object} includeOptions
* @param {Object} options * @param {object} options
* @private * @private
*/ */
static _groupJoinData(rows, includeOptions, options) { static _groupJoinData(rows, includeOptions, options) {
......
...@@ -33,7 +33,7 @@ class ConnectionManager extends AbstractConnectionManager { ...@@ -33,7 +33,7 @@ class ConnectionManager extends AbstractConnectionManager {
* Set the pool handlers on connection.error * Set the pool handlers on connection.error
* Also set proper timezone once connection is connected. * Also set proper timezone once connection is connected.
* *
* @param {Object} config * @param {object} config
* @returns {Promise<Connection>} * @returns {Promise<Connection>}
* @private * @private
*/ */
......
...@@ -8,7 +8,7 @@ module.exports = BaseTypes => { ...@@ -8,7 +8,7 @@ module.exports = BaseTypes => {
/** /**
* Removes unsupported MSSQL options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types. * Removes unsupported MSSQL options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types.
* *
* @param {Object} dataType The base integer data type. * @param {object} dataType The base integer data type.
* @private * @private
*/ */
function removeUnsupportedIntegerOptions(dataType) { function removeUnsupportedIntegerOptions(dataType) {
......
...@@ -695,7 +695,7 @@ class MSSQLQueryGenerator extends AbstractQueryGenerator { ...@@ -695,7 +695,7 @@ class MSSQLQueryGenerator extends AbstractQueryGenerator {
/** /**
* Generates an SQL query that returns all foreign keys details of a table. * Generates an SQL query that returns all foreign keys details of a table.
* *
* @param {string|Object} table * @param {string|object} table
* @param {string} catalogName database name * @param {string} catalogName database name
* @returns {string} * @returns {string}
*/ */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@param {QueryInterface} qi @param {QueryInterface} qi
@param {string} tableName The name of the table. @param {string} tableName The name of the table.
@param {string} attributeName The name of the attribute that we want to remove. @param {string} attributeName The name of the attribute that we want to remove.
@param {Object} options @param {object} options
@param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries
@private @private
......
...@@ -33,7 +33,7 @@ class ConnectionManager extends AbstractConnectionManager { ...@@ -33,7 +33,7 @@ class ConnectionManager extends AbstractConnectionManager {
* Set the pool handlers on connection.error * Set the pool handlers on connection.error
* Also set proper timezone once connection is connected. * Also set proper timezone once connection is connected.
* *
* @param {Object} config * @param {object} config
* @returns {Promise<Connection>} * @returns {Promise<Connection>}
* @private * @private
*/ */
......
...@@ -499,7 +499,7 @@ class MySQLQueryGenerator extends AbstractQueryGenerator { ...@@ -499,7 +499,7 @@ class MySQLQueryGenerator extends AbstractQueryGenerator {
/** /**
* Generates an SQL query that returns all foreign keys of a table. * Generates an SQL query that returns all foreign keys of a table.
* *
* @param {Object} table The table. * @param {object} table The table.
* @param {string} schemaName The name of the schema. * @param {string} schemaName The name of the schema.
* @returns {string} The generated sql query. * @returns {string} The generated sql query.
* @private * @private
...@@ -512,7 +512,7 @@ class MySQLQueryGenerator extends AbstractQueryGenerator { ...@@ -512,7 +512,7 @@ class MySQLQueryGenerator extends AbstractQueryGenerator {
/** /**
* Generates an SQL query that returns the foreign key constraint of a given column. * Generates an SQL query that returns the foreign key constraint of a given column.
* *
* @param {Object} table The table. * @param {object} table The table.
* @param {string} columnName The name of the column. * @param {string} columnName The name of the column.
* @returns {string} The generated sql query. * @returns {string} The generated sql query.
* @private * @private
......
...@@ -17,7 +17,7 @@ const sequelizeErrors = require('../../errors'); ...@@ -17,7 +17,7 @@ const sequelizeErrors = require('../../errors');
@param {QueryInterface} qi @param {QueryInterface} qi
@param {string} tableName The name of the table. @param {string} tableName The name of the table.
@param {string} columnName The name of the attribute that we want to remove. @param {string} columnName The name of the attribute that we want to remove.
@param {Object} options @param {object} options
@private @private
*/ */
...@@ -50,7 +50,7 @@ function removeColumn(qi, tableName, columnName, options = {}) { ...@@ -50,7 +50,7 @@ function removeColumn(qi, tableName, columnName, options = {}) {
* @param {QueryInterface} qi * @param {QueryInterface} qi
* @param {string} tableName * @param {string} tableName
* @param {string} constraintName * @param {string} constraintName
* @param {Object} options * @param {object} options
* *
* @private * @private
*/ */
......
...@@ -9,7 +9,7 @@ module.exports = BaseTypes => { ...@@ -9,7 +9,7 @@ module.exports = BaseTypes => {
/** /**
* Removes unsupported Postgres options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types. * Removes unsupported Postgres options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types.
* *
* @param {Object} dataType The base integer data type. * @param {object} dataType The base integer data type.
* @private * @private
*/ */
function removeUnsupportedIntegerOptions(dataType) { function removeUnsupportedIntegerOptions(dataType) {
......
...@@ -17,8 +17,8 @@ const QueryTypes = require('../../query-types'); ...@@ -17,8 +17,8 @@ const QueryTypes = require('../../query-types');
* *
* @param {QueryInterface} qi * @param {QueryInterface} qi
* @param {string} tableName Name of table to create * @param {string} tableName Name of table to create
* @param {Object} attributes Object representing a list of normalized table attributes * @param {object} attributes Object representing a list of normalized table attributes
* @param {Object} [options] * @param {object} [options]
* @param {Model} [model] * @param {Model} [model]
* *
* @returns {Promise} * @returns {Promise}
......
...@@ -15,7 +15,7 @@ class Query extends AbstractQuery { ...@@ -15,7 +15,7 @@ class Query extends AbstractQuery {
* Rewrite query with parameters. * Rewrite query with parameters.
* *
* @param {string} sql * @param {string} sql
* @param {Array|Object} values * @param {Array|object} values
* @param {string} dialect * @param {string} dialect
* @private * @private
*/ */
......
...@@ -6,7 +6,7 @@ module.exports = BaseTypes => { ...@@ -6,7 +6,7 @@ module.exports = BaseTypes => {
/** /**
* Removes unsupported SQLite options, i.e., UNSIGNED and ZEROFILL, for the integer data types. * Removes unsupported SQLite options, i.e., UNSIGNED and ZEROFILL, for the integer data types.
* *
* @param {Object} dataType The base integer data type. * @param {object} dataType The base integer data type.
* @private * @private
*/ */
function removeUnsupportedIntegerOptions(dataType) { function removeUnsupportedIntegerOptions(dataType) {
......
...@@ -20,7 +20,7 @@ const QueryTypes = require('../../query-types'); ...@@ -20,7 +20,7 @@ const QueryTypes = require('../../query-types');
@param {QueryInterface} qi @param {QueryInterface} qi
@param {string} tableName The name of the table. @param {string} tableName The name of the table.
@param {string} attributeName The name of the attribute that we want to remove. @param {string} attributeName The name of the attribute that we want to remove.
@param {Object} options @param {object} options
@param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries
@since 1.6.0 @since 1.6.0
...@@ -45,8 +45,8 @@ exports.removeColumn = removeColumn; ...@@ -45,8 +45,8 @@ exports.removeColumn = removeColumn;
@param {QueryInterface} qi @param {QueryInterface} qi
@param {string} tableName The name of the table. @param {string} tableName The name of the table.
@param {Object} attributes An object with the attribute's name as key and its options as value object. @param {object} attributes An object with the attribute's name as key and its options as value object.
@param {Object} options @param {object} options
@param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries
@since 1.6.0 @since 1.6.0
...@@ -74,7 +74,7 @@ exports.changeColumn = changeColumn; ...@@ -74,7 +74,7 @@ exports.changeColumn = changeColumn;
@param {string} tableName The name of the table. @param {string} tableName The name of the table.
@param {string} attrNameBefore The name of the attribute before it was renamed. @param {string} attrNameBefore The name of the attribute before it was renamed.
@param {string} attrNameAfter The name of the attribute after it was renamed. @param {string} attrNameAfter The name of the attribute after it was renamed.
@param {Object} options @param {object} options
@param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries
@since 1.6.0 @since 1.6.0
...@@ -97,7 +97,7 @@ exports.renameColumn = renameColumn; ...@@ -97,7 +97,7 @@ exports.renameColumn = renameColumn;
* @param {QueryInterface} qi * @param {QueryInterface} qi
* @param {string} tableName * @param {string} tableName
* @param {string} constraintName * @param {string} constraintName
* @param {Object} options * @param {object} options
* *
* @private * @private
*/ */
...@@ -145,7 +145,7 @@ exports.removeConstraint = removeConstraint; ...@@ -145,7 +145,7 @@ exports.removeConstraint = removeConstraint;
/** /**
* @param {QueryInterface} qi * @param {QueryInterface} qi
* @param {string} tableName * @param {string} tableName
* @param {Object} options * @param {object} options
* *
* @private * @private
*/ */
...@@ -176,7 +176,7 @@ exports.addConstraint = addConstraint; ...@@ -176,7 +176,7 @@ exports.addConstraint = addConstraint;
/** /**
* @param {QueryInterface} qi * @param {QueryInterface} qi
* @param {string} tableName * @param {string} tableName
* @param {Object} options Query Options * @param {object} options Query Options
* *
* @private * @private
* @returns {Promise} * @returns {Promise}
......
...@@ -20,7 +20,7 @@ class Query extends AbstractQuery { ...@@ -20,7 +20,7 @@ class Query extends AbstractQuery {
* rewrite query with parameters. * rewrite query with parameters.
* *
* @param {string} sql * @param {string} sql
* @param {Array|Object} values * @param {Array|object} values
* @param {string} dialect * @param {string} dialect
* @private * @private
*/ */
......
...@@ -7,7 +7,7 @@ const BaseError = require('./base-error'); ...@@ -7,7 +7,7 @@ const BaseError = require('./base-error');
* Used with Promise.AggregateError * Used with Promise.AggregateError
* *
* @param {Error} error Error for a given record/instance * @param {Error} error Error for a given record/instance
* @param {Object} record DAO instance that error belongs to * @param {object} record DAO instance that error belongs to
*/ */
class BulkRecordError extends BaseError { class BulkRecordError extends BaseError {
constructor(error, record) { constructor(error, record) {
......
...@@ -61,8 +61,8 @@ class ValidationErrorItem { ...@@ -61,8 +61,8 @@ class ValidationErrorItem {
* @param {string} type The type/origin of the validation error * @param {string} type The type/origin of the validation error
* @param {string} path The field that triggered the validation error * @param {string} path The field that triggered the validation error
* @param {string} value The value that generated the error * @param {string} value The value that generated the error
* @param {Object} [inst] the DAO instance that caused the validation error * @param {object} [inst] the DAO instance that caused the validation error
* @param {Object} [validatorKey] a validation "key", used for identification * @param {object} [validatorKey] a validation "key", used for identification
* @param {string} [fnName] property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable * @param {string} [fnName] property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable
* @param {string} [fnArgs] parameters used with the BUILT-IN validator function, if applicable * @param {string} [fnArgs] parameters used with the BUILT-IN validator function, if applicable
*/ */
...@@ -179,7 +179,7 @@ class ValidationErrorItem { ...@@ -179,7 +179,7 @@ class ValidationErrorItem {
/** /**
* An enum that defines valid ValidationErrorItem `origin` values * An enum that defines valid ValidationErrorItem `origin` values
* *
* @type {Object} * @type {object}
* @property CORE {string} specifies errors that originate from the sequelize "core" * @property CORE {string} specifies errors that originate from the sequelize "core"
* @property DB {string} specifies validation errors that originate from the storage engine * @property DB {string} specifies validation errors that originate from the storage engine
* @property FUNCTION {string} specifies validation errors that originate from validator functions (both built-in and custom) defined for a given attribute * @property FUNCTION {string} specifies validation errors that originate from validator functions (both built-in and custom) defined for a given attribute
...@@ -195,7 +195,7 @@ ValidationErrorItem.Origins = { ...@@ -195,7 +195,7 @@ ValidationErrorItem.Origins = {
* that maps current `type` strings (as given to ValidationErrorItem.constructor()) to * that maps current `type` strings (as given to ValidationErrorItem.constructor()) to
* our new `origin` values. * our new `origin` values.
* *
* @type {Object} * @type {object}
*/ */
ValidationErrorItem.TypeStringMap = { ValidationErrorItem.TypeStringMap = {
'notnull violation': 'CORE', 'notnull violation': 'CORE',
......
...@@ -73,7 +73,7 @@ const Hooks = { ...@@ -73,7 +73,7 @@ const Hooks = {
/** /**
* Process user supplied hooks definition * Process user supplied hooks definition
* *
* @param {Object} hooks hooks definition * @param {object} hooks hooks definition
* *
* @private * @private
* @memberof Sequelize * @memberof Sequelize
......
...@@ -12,7 +12,7 @@ const validator = require('./utils/validator-extras').validator; ...@@ -12,7 +12,7 @@ const validator = require('./utils/validator-extras').validator;
* Instance Validator. * Instance Validator.
* *
* @param {Instance} modelInstance The model instance. * @param {Instance} modelInstance The model instance.
* @param {Object} options A dictionary with options. * @param {object} options A dictionary with options.
* *
* @private * @private
*/ */
...@@ -281,7 +281,7 @@ class InstanceValidator { ...@@ -281,7 +281,7 @@ class InstanceValidator {
* @param {string} validatorType One of known to Sequelize validators. * @param {string} validatorType One of known to Sequelize validators.
* @param {string} field The field that is being validated * @param {string} field The field that is being validated
* *
* @returns {Object} An object with specific keys to invoke the validator. * @returns {object} An object with specific keys to invoke the validator.
*/ */
_invokeBuiltinValidator(value, test, validatorType, field) { _invokeBuiltinValidator(value, test, validatorType, field) {
return Promise.try(() => { return Promise.try(() => {
...@@ -330,7 +330,7 @@ class InstanceValidator { ...@@ -330,7 +330,7 @@ class InstanceValidator {
/** /**
* Will validate a single field against its schema definition (isnull). * Will validate a single field against its schema definition (isnull).
* *
* @param {Object} rawAttribute As defined in the Schema. * @param {object} rawAttribute As defined in the Schema.
* @param {string} field The field name. * @param {string} field The field name.
* @param {*} value anything. * @param {*} value anything.
* *
......
...@@ -35,7 +35,7 @@ class ModelManager { ...@@ -35,7 +35,7 @@ class ModelManager {
* Will take foreign key constraints into account so that dependencies are visited before dependents. * Will take foreign key constraints into account so that dependencies are visited before dependents.
* *
* @param {Function} iterator method to execute on each model * @param {Function} iterator method to execute on each model
* @param {Object} [options] iterator options * @param {object} [options] iterator options
* @private * @private
*/ */
forEachModel(iterator, options) { forEachModel(iterator, options) {
......
...@@ -15,7 +15,7 @@ class Transaction { ...@@ -15,7 +15,7 @@ class Transaction {
* Creates a new transaction instance * Creates a new transaction instance
* *
* @param {Sequelize} sequelize A configured sequelize Instance * @param {Sequelize} sequelize A configured sequelize Instance
* @param {Object} options An object with options * @param {object} options An object with options
* @param {string} options.type=true Sets the type of the transaction. * @param {string} options.type=true Sets the type of the transaction.
* @param {string} options.isolationLevel=true Sets the isolation level of the transaction. * @param {string} options.isolationLevel=true Sets the isolation level of the transaction.
* @param {string} options.deferrable Sets the constraints to be deferred or immediately checked. * @param {string} options.deferrable Sets the constraints to be deferred or immediately checked.
...@@ -264,7 +264,7 @@ class Transaction { ...@@ -264,7 +264,7 @@ class Transaction {
* }); * });
* # The query will now return any rows that aren't locked by another transaction * # The query will now return any rows that aren't locked by another transaction
* *
* @returns {Object} * @returns {object}
* @property UPDATE * @property UPDATE
* @property SHARE * @property SHARE
* @property KEY_SHARE Postgres 9.3+ only * @property KEY_SHARE Postgres 9.3+ only
......
...@@ -380,8 +380,8 @@ exports.removeTicks = removeTicks; ...@@ -380,8 +380,8 @@ exports.removeTicks = removeTicks;
* address.coordinates.longitude: 12.5964313 * address.coordinates.longitude: 12.5964313
* } * }
* *
* @param {Object} value an Object * @param {object} value an Object
* @returns {Object} a flattened object * @returns {object} a flattened object
* @private * @private
*/ */
function flattenObjectDeep(value) { function flattenObjectDeep(value) {
...@@ -488,7 +488,7 @@ exports.Where = Where; ...@@ -488,7 +488,7 @@ exports.Where = Where;
/** /**
* getOperators * getOperators
* *
* @param {Object} obj * @param {object} obj
* @returns {Array<Symbol>} All operators properties of obj * @returns {Array<Symbol>} All operators properties of obj
* @private * @private
*/ */
...@@ -500,7 +500,7 @@ exports.getOperators = getOperators; ...@@ -500,7 +500,7 @@ exports.getOperators = getOperators;
/** /**
* getComplexKeys * getComplexKeys
* *
* @param {Object} obj * @param {object} obj
* @returns {Array<string|Symbol>} All keys including operators * @returns {Array<string|Symbol>} All keys including operators
* @private * @private
*/ */
...@@ -512,7 +512,7 @@ exports.getComplexKeys = getComplexKeys; ...@@ -512,7 +512,7 @@ exports.getComplexKeys = getComplexKeys;
/** /**
* getComplexSize * getComplexSize
* *
* @param {Object|Array} obj * @param {object|Array} obj
* @returns {number} Length of object properties including operators if obj is array returns its length * @returns {number} Length of object properties including operators if obj is array returns its length
* @private * @private
*/ */
...@@ -524,7 +524,7 @@ exports.getComplexSize = getComplexSize; ...@@ -524,7 +524,7 @@ exports.getComplexSize = getComplexSize;
/** /**
* Returns true if a where clause is empty, even with Symbols * Returns true if a where clause is empty, even with Symbols
* *
* @param {Object} obj * @param {object} obj
* @returns {boolean} * @returns {boolean}
* @private * @private
*/ */
...@@ -549,7 +549,7 @@ exports.generateEnumName = generateEnumName; ...@@ -549,7 +549,7 @@ exports.generateEnumName = generateEnumName;
/** /**
* Returns an new Object which keys are camelized * Returns an new Object which keys are camelized
* *
* @param {Object} obj * @param {object} obj
* @returns {string} * @returns {string}
* @private * @private
*/ */
...@@ -570,9 +570,9 @@ exports.camelizeObjectKeys = camelizeObjectKeys; ...@@ -570,9 +570,9 @@ exports.camelizeObjectKeys = camelizeObjectKeys;
* *
* **Note:** This method mutates `object`. * **Note:** This method mutates `object`.
* *
* @param {Object} object The destination object. * @param {object} object The destination object.
* @param {...Object} [sources] The source objects. * @param {...object} [sources] The source objects.
* @returns {Object} Returns `object`. * @returns {object} Returns `object`.
* @private * @private
*/ */
function defaults(object, ...sources) { function defaults(object, ...sources) {
...@@ -602,12 +602,12 @@ exports.defaults = defaults; ...@@ -602,12 +602,12 @@ exports.defaults = defaults;
/** /**
* *
* @param {Object} index * @param {object} index
* @param {Array} index.fields * @param {Array} index.fields
* @param {string} [index.name] * @param {string} [index.name]
* @param {string|Object} tableName * @param {string|object} tableName
* *
* @returns {Object} * @returns {object}
* @private * @private
*/ */
function nameIndex(index, tableName) { function nameIndex(index, tableName) {
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
"wkx": "^0.4.6" "wkx": "^0.4.6"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^7.6.1", "@commitlint/cli": "^8.0.0",
"@commitlint/config-angular": "^7.6.0", "@commitlint/config-angular": "^8.0.0",
"@types/bluebird": "^3.5.26", "@types/bluebird": "^3.5.26",
"@types/node": "^10.14.6", "@types/node": "^12.0.8",
"@types/validator": "^10.11.0", "@types/validator": "^10.11.0",
"big-integer": "^1.6.42", "big-integer": "^1.6.42",
"chai": "^4.x", "chai": "^4.x",
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
"esdoc-inject-style-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0",
"eslint": "^5.15.0", "eslint": "^5.15.0",
"eslint-plugin-jsdoc": "^4.8.4", "eslint-plugin-jsdoc": "^8.0.1",
"eslint-plugin-mocha": "^5.2.1", "eslint-plugin-mocha": "^5.2.1",
"husky": "^2.2.0", "husky": "^2.2.0",
"js-combinatorics": "^0.5.4", "js-combinatorics": "^0.5.4",
"lcov-result-merger": "^3.0.0", "lcov-result-merger": "^3.0.0",
"lint-staged": "^8.1.6", "lint-staged": "^8.1.6",
"mariadb": "^2.0.5", "mariadb": "^2.0.5",
"markdownlint-cli": "^0.15.0", "markdownlint-cli": "^0.16.0",
"mocha": "^6.0.2", "mocha": "^6.0.2",
"mysql2": "^1.6.5", "mysql2": "^1.6.5",
"nyc": "^13.3.0", "nyc": "^13.3.0",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!