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

Method removeIndexQuery

lib/dialects/db2/query-generator.js:555–569  ·  lib/dialects/db2/query-generator.js::Db2QueryGenerator.removeIndexQuery
(tableName, indexNameOrAttributes)

Source from the content-addressed store, hash-verified

553 }
554
555 removeIndexQuery(tableName, indexNameOrAttributes) {
556 const sql = class="st">'DROP INDEX <%= indexName %>';
557 let indexName = indexNameOrAttributes;
558
559 if (typeof indexName !== class="st">'string') {
560 indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join(class="st">'_')}`);
561 }
562
563 const values = {
564 tableName: this.quoteIdentifiers(tableName),
565 indexName: this.quoteIdentifiers(indexName)
566 };
567
568 return _.template(sql, this._templateSettings)(values);
569 }
570
571 attributeToSQL(attribute, options) {
572 if (!_.isPlainObject(attribute)) {

Callers 2

removeIndexMethod · 0.45
index.test.jsFile · 0.45

Calls 1

quoteIdentifiersMethod · 0.45

Tested by

no test coverage detected