feat(tabs): support naming and renaming result tabs

This commit is contained in:
zipg authored and GitHub committed 2026-09-17 12:55:22 +08:00
1 parent ee757fbe65
commit ee6078f195
16 files changed
+172 -4

No files matched your search

@@ -12,6 +12,12 @@ describe("queryResultNameFromPreamble", () => {
expect(queryResultNameFromPreamble("-- older comment\n/*\n-- Name: block\n*/\n-- 当前时间\n")).toBe("当前时间");
expect(queryResultNameFromPreamble("/* -- block only */\n-- \n")).toBeUndefined();
});
it("accepts hash comments for MySQL without treating them as portable SQL comments", () => {
expect(queryResultNameFromPreamble("# MySQL report\nSELECT 1", { databaseType: "mysql" })).toBe("MySQL report");
expect(queryResultNameFromPreamble("# temporary table\nSELECT 1", { databaseType: "sqlserver" })).toBeUndefined();
expect(queryResultNameFromPreamble("# portable comment\nSELECT 1")).toBeUndefined();
});
});
describe("queryResultSourceLabel", () => {