Skip to content

Commit

Permalink
Make it work when a default database is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
cwurm committed Jan 9, 2024
1 parent 53a5ca8 commit 17b0873
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/data/CHDatasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,6 @@ export class Datasource

if (tagSource.type === TagType.query) {
this.adHocFilter.setTargetTableFromQuery(tagSource.source);
} else {
let table = tagSource.from;
if (table?.includes('.')) {
table = table.split('.')[1];
}
this.adHocFilter.setTargetTable(table || '');
}

const results = await this.runQuery({ rawSql: tagSource.source });
Expand Down
4 changes: 0 additions & 4 deletions src/data/adHocFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { getTable } from './ast';
export class AdHocFilter {
private _targetTable = '';

setTargetTable(table: string) {
this._targetTable = table;
}

setTargetTableFromQuery(query: string) {
this._targetTable = getTable(query);
if (this._targetTable === '') {
Expand Down

0 comments on commit 17b0873

Please sign in to comment.