Skip to content

Commit a192311

Browse files
committed
resolve the array
1 parent 6e0d36e commit a192311

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/dialect/mysql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Mysql.prototype.visitInsert = function(insert) {
5858
};
5959

6060
Mysql.prototype.visitIndexes = function(node) {
61-
var tableName = this.visit(this._queryNode.table.toNode());
61+
var tableName = this.visit(this._queryNode.table.toNode())[0];
6262

6363
return "SHOW INDEX FROM " + tableName;
6464
};

lib/dialect/postgres.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ Postgres.prototype.visitModifier = function(node) {
568568

569569
Postgres.prototype.visitIndexes = function(node) {
570570
/* jshint unused: false */
571-
var tableName = this.visit(this._queryNode.table.toNode());
571+
var tableName = this.visit(this._queryNode.table.toNode())[0];
572572

573573
return [
574574
"SELECT relname",

lib/dialect/sqlite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Sqlite.prototype.visitAddColumn = function(addColumn) {
4141
};
4242

4343
Sqlite.prototype.visitIndexes = function(node) {
44-
var tableName = this.visit(this._queryNode.table.toNode());
44+
var tableName = this.visit(this._queryNode.table.toNode())[0];
4545
return "PRAGMA INDEX_LIST(" + tableName + ")";
4646
};
4747

0 commit comments

Comments
 (0)