MCPcopy
hub / github.com/sequelize/sequelize / removeIndexQuery

Method removeIndexQuery

src/dialects/db2/query-generator.js:565–579  ·  view source on GitHub ↗
(tableName, indexNameOrAttributes)

Source from the content-addressed store, hash-verified

563 }
564
565 removeIndexQuery(tableName, indexNameOrAttributes) {
566 const sql = 'DROP INDEX <%= indexName %>';
567 let indexName = indexNameOrAttributes;
568
569 if (typeof indexName !== 'string') {
570 indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join('_')}`);
571 }
572
573 const values = {
574 tableName: this.quoteIdentifiers(tableName),
575 indexName: this.quoteIdentifiers(indexName)
576 };
577
578 return _.template(sql, this._templateSettings)(values);
579 }
580
581 attributeToSQL(attribute, options) {
582 if (!_.isPlainObject(attribute)) {

Callers 2

index.test.jsFile · 0.45
removeIndexMethod · 0.45

Calls 1

quoteIdentifiersMethod · 0.45

Tested by

no test coverage detected