Skip to content

Commit

Permalink
docs(query-interface): improve doc string descriptions (#10723)
Browse files Browse the repository at this point in the history
  • Loading branch information
waldyrious authored and sushantdhiman committed Apr 8, 2019
1 parent b6c9117 commit d87dab5
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions lib/query-interface.js
Expand Up @@ -25,7 +25,7 @@ class QueryInterface {
}

/**
* Creates a database
* Create a database
*
* @param {string} database Database name to create
* @param {Object} [options] Query options
Expand All @@ -44,7 +44,7 @@ class QueryInterface {
}

/**
* Drops a database
* Drop a database
*
* @param {string} database Database name to drop
* @param {Object} [options] Query options
Expand All @@ -58,7 +58,7 @@ class QueryInterface {
}

/**
* Creates a schema
* Create a schema
*
* @param {string} schema Schema name to create
* @param {Object} [options] Query options
Expand All @@ -72,7 +72,7 @@ class QueryInterface {
}

/**
* Drops a schema
* Drop a schema
*
* @param {string} schema Schema name to drop
* @param {Object} [options] Query options
Expand Down Expand Up @@ -122,7 +122,7 @@ class QueryInterface {
}

/**
* Returns database version
* Return database version
*
* @param {Object} [options] Query options
* @param {QueryType} [options.type] Query type
Expand Down Expand Up @@ -237,7 +237,7 @@ class QueryInterface {
}

/**
* Drops a table from database
* Drop a table from database
*
* @param {string} tableName Table name to drop
* @param {Object} options Query options
Expand Down Expand Up @@ -332,7 +332,7 @@ class QueryInterface {
}

/**
* Drop specified enum from database, Postgres Only
* Drop specified enum from database (Postgres only)
*
* @param {string} [enumName] Enum name to drop
* @param {Object} options Query options
Expand All @@ -354,7 +354,7 @@ class QueryInterface {
}

/**
* Drop all enums from database, Postgres Only
* Drop all enums from database (Postgres only)
*
* @param {Object} options Query options
*
Expand All @@ -375,7 +375,7 @@ class QueryInterface {
}

/**
* List all enums, Postgres Only
* List all enums (Postgres only)
*
* @param {string} [tableName] Table whose enum to list
* @param {Object} [options] Query options
Expand All @@ -390,7 +390,7 @@ class QueryInterface {
}

/**
* Renames a table
* Rename a table
*
* @param {string} before Current name of table
* @param {string} after New name from table
Expand Down Expand Up @@ -489,7 +489,7 @@ class QueryInterface {
}

/**
* Add a new column into a table
* Add a new column to a table
*
* ```js
* queryInterface.addColumn('tableA', 'columnC', Sequelize.STRING, {
Expand All @@ -515,7 +515,7 @@ class QueryInterface {
}

/**
* Remove a column from table
* Remove a column from a table
*
* @param {string} tableName Table to remove column from
* @param {string} attributeName Columns name to remove
Expand Down Expand Up @@ -620,7 +620,7 @@ class QueryInterface {
}

/**
* Add index to a column
* Add an index to a column
*
* @param {string|Object} tableName Table name to add index on, can be a object with schema
* @param {Array} [attributes] Use options.fields instead, List of attributes to add index on
Expand Down Expand Up @@ -698,7 +698,7 @@ class QueryInterface {
}

/**
* Get foreign key references details for the table.
* Get foreign key references details for the table
*
* Those details contains constraintSchema, constraintName, constraintCatalog
* tableCatalog, tableSchema, tableName, columnName,
Expand Down Expand Up @@ -753,7 +753,7 @@ class QueryInterface {
}

/**
* Add constraints to table
* Add a constraint to a table
*
* Available constraints:
* - UNIQUE
Expand Down Expand Up @@ -846,6 +846,7 @@ class QueryInterface {
}

/**
* Remove a constraint from a table
*
* @param {string} tableName Table name to drop constraint from
* @param {string} constraintName Constraint name
Expand Down Expand Up @@ -965,7 +966,7 @@ class QueryInterface {
}

/**
* Insert records into a table
* Insert multiple records into a table
*
* @example
* queryInterface.bulkInsert('roles', [{
Expand Down Expand Up @@ -1078,7 +1079,7 @@ class QueryInterface {
}

/**
* Delete records from a table
* Delete multiple records from a table
*
* @param {string} tableName table name from where to delete records
* @param {Object} where where conditions to find records to delete
Expand Down Expand Up @@ -1214,7 +1215,7 @@ class QueryInterface {
}

/**
* Create SQL function
* Create an SQL function
*
* @example
* queryInterface.createFunction(
Expand Down Expand Up @@ -1252,7 +1253,7 @@ class QueryInterface {
}

/**
* Drop SQL function
* Drop an SQL function
*
* @example
* queryInterface.dropFunction(
Expand Down Expand Up @@ -1280,7 +1281,7 @@ class QueryInterface {
}

/**
* Rename SQL function
* Rename an SQL function
*
* @example
* queryInterface.renameFunction(
Expand Down

0 comments on commit d87dab5

Please sign in to comment.