[sql lab] specify schema name when generating vanila query (#1096)

* [sql lab] specify schema name when generating vanila query

* Fixing some react warnings
This commit is contained in:
Maxime Beauchemin
2016-09-12 23:09:18 -07:00
committed by GitHub
parent 1f761c61dd
commit df533d30fc
6 changed files with 18 additions and 11 deletions

View File

@@ -19,7 +19,11 @@ class TableElement extends React.Component {
cols += ', ';
}
});
return `SELECT ${cols}\nFROM ${this.props.table.name}`;
let tableName = this.props.table.name;
if (this.props.table.schema) {
tableName = this.props.table.schema + '.' + tableName;
}
return `SELECT ${cols}\nFROM ${tableName}`;
}
popSelectStar() {