We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abbe312 commit 6278d6dCopy full SHA for 6278d6d
1 file changed
index.js
@@ -313,6 +313,26 @@ var CockroachDriver = Base.extend({
313
callbacks: callbacks,
314
constraints: constraint.join(" ")
315
};
316
+ },
317
+
318
+ removeIndex: function(tableName, indexName, callback) {
319
+ var sql;
320
+ if (arguments.length === 2 && typeof indexName === "function") {
321
+ callback = indexName;
322
+ indexName = tableName;
323
+ tableName = null;
324
+ } else if (arguments.length === 1 && typeof tableName === "string") {
325
326
327
+ }
328
329
+ if (tableName) {
330
+ sql = util.format('DROP INDEX "%s"@"%s"', indexName, tableName);
331
+ } else {
332
+ sql = util.format('DROP INDEX "%s"', indexName);
333
334
335
+ return this.runSql(sql).nodeify(callback);
336
}
337
});
338
0 commit comments