db connector: ds loading refactor

This commit is contained in:
Alexander Zobnin
2018-10-30 21:05:48 +03:00
parent 6eb52619b9
commit 34ba8bba1c
3 changed files with 42 additions and 30 deletions

View File

@@ -9,15 +9,17 @@ const supportedDatabases = {
};
export class SQLConnector extends DBConnector {
constructor(options, datasourceSrv, backendSrv) {
constructor(options, datasourceSrv) {
super(options, datasourceSrv);
this.backendSrv = backendSrv;
this.limit = options.limit || DEFAULT_QUERY_LIMIT;
this.sqlDialect = null;
super.loadDBDataSource()
.then(() => this.loadSQLDialect());
.then(ds => {
this.backendSrv = ds.backendSrv;
this.loadSQLDialect();
});
}
loadSQLDialect() {