fix(mysql): show scheduled events in the sidebar
This commit is contained in:
1 parent
5011468a9a
commit
2b11af94ba
26 files changed
+137
-33
No files matched your search
@@ -39,8 +39,8 @@ describe("databaseObjectCapabilities", () => {
|
||||
});
|
||||
|
||||
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("mysql")).toEqual(["TABLE", "VIEW", "PROCEDURE", "FUNCTION", "TRIGGER", "EVENT"]);
|
||||
expect(databaseObjectCapabilities("mysql").sourceReadable).toEqual(["VIEW", "PROCEDURE", "FUNCTION", "TRIGGER", "EVENT"]);
|
||||
|
||||
expect(sidebarObjectKindsForDatabase("doris")).toEqual(["TABLE", "VIEW"]);
|
||||
expect(sidebarObjectKindsForDatabase("starrocks")).toEqual(["TABLE", "VIEW", "MATERIALIZED_VIEW"]);
|
||||
|
||||
@@ -248,6 +248,16 @@ describe("programmable database objects", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("groups MySQL scheduled events under a dedicated Events group", () => {
|
||||
const objects: ObjectInfo[] = [{ name: "event_daily_middle_db_sync", object_type: "EVENT", schema: "shop" }];
|
||||
|
||||
const groups = buildGroupedObjectTreeNodes({ ...context, schema: "shop", objects, databaseType: "mysql" });
|
||||
const eventGroup = groups.find((node) => node.type === "group-events");
|
||||
|
||||
expect(eventGroup).toEqual(expect.objectContaining({ objectCount: 1, label: "tree.events" }));
|
||||
expect(eventGroup?.children).toEqual([expect.objectContaining({ type: "event", objectName: "event_daily_middle_db_sync" })]);
|
||||
});
|
||||
|
||||
it("keeps table-scoped Kingbase triggers distinct and source-addressable", () => {
|
||||
const objects: ObjectInfo[] = [
|
||||
{ name: "audit_before", object_type: "TRIGGER", schema: "public", parent_schema: "public", parent_name: "items" },
|
||||
|
||||
Reference in new issue
Block a user