mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-01 08:59:39 +02:00
refactor: remove legacy ktx compatibility shims (#211)
* refactor: remove legacy ktx compatibility shims * fix: restore overlay collision guidance
This commit is contained in:
parent
a954a29a76
commit
96952fb43c
59 changed files with 294 additions and 342 deletions
|
|
@ -134,7 +134,6 @@ const sourceAdapterByDriver = new Map<string, string>([
|
|||
['metabase', 'metabase'],
|
||||
['local_metabase', 'metabase'],
|
||||
['looker', 'looker'],
|
||||
['local_looker', 'looker'],
|
||||
['notion', 'notion'],
|
||||
['metricflow', 'metricflow'],
|
||||
['dbt', 'dbt'],
|
||||
|
|
@ -143,7 +142,6 @@ const sourceAdapterByDriver = new Map<string, string>([
|
|||
|
||||
const queryHistoryDialectByDriver = new Map<string, HistoricSqlDialect>([
|
||||
['postgres', 'postgres'],
|
||||
['postgresql', 'postgres'],
|
||||
['bigquery', 'bigquery'],
|
||||
['snowflake', 'snowflake'],
|
||||
]);
|
||||
|
|
@ -309,12 +307,6 @@ function queryHistoryPullConfig(input: {
|
|||
};
|
||||
}
|
||||
|
||||
function depthFromLegacyScanMode(
|
||||
mode: Extract<KtxScanArgs, { command: 'run' }>['mode'] | undefined,
|
||||
): KtxPublicIngestDepth | undefined {
|
||||
return mode === 'enriched' || mode === 'relationships' ? 'deep' : undefined;
|
||||
}
|
||||
|
||||
function sourceDirForConnection(connection: KtxProjectConnectionConfig): string | undefined {
|
||||
const value = connection.source_dir;
|
||||
return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
|
||||
|
|
@ -340,8 +332,7 @@ function resolveDatabaseTargetOptions(input: {
|
|||
const requestedQh =
|
||||
explicitQueryHistory === 'enabled' ||
|
||||
(explicitQueryHistory !== 'disabled' && (windowOverrideRequested || storedEnabled));
|
||||
let depth =
|
||||
input.args.depth ?? depthFromLegacyScanMode(input.args.scanMode) ?? databaseContextDepth(input.connection) ?? 'fast';
|
||||
let depth = input.args.depth ?? databaseContextDepth(input.connection) ?? 'fast';
|
||||
const queryHistory = {
|
||||
enabled: false,
|
||||
...(input.args.queryHistoryWindowDays !== undefined
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue