refactor: remove legacy ktx compatibility shims (#211)

* refactor: remove legacy ktx compatibility shims

* fix: restore overlay collision guidance
This commit is contained in:
Andrey Avtomonov 2026-05-24 16:57:23 +02:00 committed by GitHub
parent a954a29a76
commit 96952fb43c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 294 additions and 342 deletions

View file

@ -25,7 +25,7 @@ export function queryHistoryDialectForConnection(connection: unknown): HistoricS
}
const conn = recordOrNull(connection);
const driver = String(conn?.driver ?? '').toLowerCase();
if (driver === 'postgres' || driver === 'postgresql') return 'postgres';
if (driver === 'postgres') return 'postgres';
if (driver === 'bigquery') return 'bigquery';
if (driver === 'snowflake') return 'snowflake';
return null;

View file

@ -155,7 +155,7 @@ describe('createDaemonLiveDatabaseIntrospection', () => {
const introspection = createDaemonLiveDatabaseIntrospection({
connections: {
warehouse: {
driver: 'postgresql',
driver: 'postgres',
url: 'postgres://localhost:5432/warehouse',
},
},

View file

@ -151,7 +151,7 @@ function optionalString(value: unknown): string | undefined {
function normalizeDriver(driver: unknown): string {
const normalized = String(driver ?? '').trim().toLowerCase();
return normalized === 'postgresql' ? 'postgres' : normalized;
return normalized;
}
function requirePostgresConnection(

View file

@ -72,7 +72,8 @@ describe('looker dialect and target validation helpers', () => {
it('maps Looker dialect names to KTX connection types', () => {
expect(lookerDialectToConnectionType('bigquery_standard_sql')).toBe('BIGQUERY');
expect(lookerDialectToConnectionType('postgres')).toBe('POSTGRESQL');
expect(lookerDialectToConnectionType('mssql')).toBe('SQLSERVER');
expect(lookerDialectToConnectionType('mssql')).toBeNull();
expect(lookerDialectToConnectionType('tsql')).toBeNull();
expect(lookerDialectToConnectionType('unknown')).toBeNull();
});

View file

@ -7,12 +7,9 @@ const LOOKER_DIALECT_TO_CONNECTION_TYPE = {
bigquery_standard_sql: 'BIGQUERY',
snowflake: 'SNOWFLAKE',
postgres: 'POSTGRESQL',
postgresql: 'POSTGRESQL',
mysql: 'MYSQL',
sqlite: 'SQLITE',
sqlserver: 'SQLSERVER',
mssql: 'SQLSERVER',
tsql: 'SQLSERVER',
clickhouse: 'CLICKHOUSE',
} as const;

View file

@ -168,7 +168,6 @@ function isRecord(value: unknown): value is Record<string, unknown> {
const historicSqlDialectByDriver = new Map<string, 'postgres' | 'bigquery' | 'snowflake'>([
['postgres', 'postgres'],
['postgresql', 'postgres'],
['bigquery', 'bigquery'],
['snowflake', 'snowflake'],
]);