fix(editor): preserve view type in object navigation
This commit is contained in:
1 parent
39aa506e44
commit
69dd363417
8 files changed
+108
-25
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import type { ObjectSourceKind } from "@/types/database";
|
||||
|
||||
export function tableObjectSourceKind(tableType: string | null | undefined): ObjectSourceKind | undefined {
|
||||
const normalized = tableType
|
||||
?.trim()
|
||||
.toUpperCase()
|
||||
.replace(/[\s-]+/g, "_");
|
||||
if (normalized === "VIEW") return "VIEW";
|
||||
if (normalized === "MATERIALIZED_VIEW") return "MATERIALIZED_VIEW";
|
||||
return undefined;
|
||||
}
|
||||
Reference in new issue
Block a user