From 17b0873866775bc959ca668891cf61706612a7b3 Mon Sep 17 00:00:00 2001 From: Christoph Wurm Date: Tue, 9 Jan 2024 00:39:59 +0000 Subject: [PATCH] Make it work when a default database is set. --- src/data/CHDatasource.ts | 6 ------ src/data/adHocFilter.ts | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/data/CHDatasource.ts b/src/data/CHDatasource.ts index 92b2d492..fc3e19a6 100644 --- a/src/data/CHDatasource.ts +++ b/src/data/CHDatasource.ts @@ -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 }); diff --git a/src/data/adHocFilter.ts b/src/data/adHocFilter.ts index 360502ec..e90f1f6a 100644 --- a/src/data/adHocFilter.ts +++ b/src/data/adHocFilter.ts @@ -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 === '') {