fix(questdb): handle materialized views and unify table_type naming

* fix(questdb): handle materialized views

* fix(test): fix rust test problems
This commit is contained in:
ptma
2026-06-18 11:40:57 +08:00
committed by GitHub
parent ad0a9075b5
commit e7ee0c9ec1
11 changed files with 112 additions and 56 deletions
@@ -357,7 +357,7 @@ async function loadTables(side: "source" | "target") {
const database = side === "source" ? sourceDatabase.value : targetDatabase.value;
if (!connectionId || !database) return;
const schema = side === "source" ? sourceSchema.value || (await resolveSchema(connectionId, database, props.prefillSchema)) : targetSchema.value || (await resolveSchema(connectionId, database));
const tables = (await api.listTables(connectionId, database, schema)).filter((table) => table.table_type !== "VIEW" && table.table_type !== "MATERIALIZED VIEW").map((table) => table.name);
const tables = (await api.listTables(connectionId, database, schema)).filter((table) => table.table_type !== "VIEW" && table.table_type !== "MATERIALIZED_VIEW").map((table) => table.name);
if (side === "source") {
const preferredSelection = props.prefillTable && tables.includes(props.prefillTable) ? [props.prefillTable] : [...selectedSourceTables.value].filter((table) => tables.includes(table));