feat(mysql): expose triggers in sidebar object tree

Closes #5199
This commit is contained in:
t8y2 committed 2026-08-12 06:21:52 +00:00
1 parent 143143a88d
commit b29e52b0a2
2 files changed
+12

No files matched your search

@@ -38,6 +38,16 @@ describe("databaseObjectCapabilities", () => {
expect(sidebarObjectKindsForDatabase("doris")).toEqual(expect.arrayContaining(["TABLE", "VIEW"]));
});
it("exposes triggers only for native MySQL among MySQL-compatible paths", () => {
expect(sidebarObjectKindsForDatabase("mysql")).toEqual(["TABLE", "VIEW", "PROCEDURE", "FUNCTION", "TRIGGER"]);
expect(databaseObjectCapabilities("mysql").sourceReadable).toEqual(["VIEW", "PROCEDURE", "FUNCTION", "TRIGGER"]);
expect(sidebarObjectKindsForDatabase("doris")).toEqual(["TABLE", "VIEW"]);
expect(sidebarObjectKindsForDatabase("starrocks")).toEqual(["TABLE", "VIEW", "MATERIALIZED_VIEW"]);
expect(sidebarObjectKindsForDatabase("manticoresearch")).toEqual(["TABLE", "FUNCTION"]);
expect(sidebarObjectKindsForDatabase("jdbc")).toEqual(["TABLE", "VIEW", "PROCEDURE", "FUNCTION"]);
});
it("normalizes space separated materialized view types", () => {
expect(normalizeSidebarObjectKind("MATERIALIZED VIEW")).toBe("MATERIALIZED_VIEW");
});