feat(editor): include database name in generated SQL

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-22 13:40:42 +08:00
1 parent fcb6ea92db
commit a6f4cebd18
34 files changed
+379 -23

No files matched your search

@@ -200,6 +200,10 @@ describe("buildSelectAllSql", () => {
expect(buildSelectAllSql("mysql", { schema: "mydb", tableName: "users" })).toBe("SELECT * FROM `users`");
});
it("includes the MySQL database when requested", () => {
expect(buildSelectAllSql("mysql", { database: "mydb", tableName: "users" }, undefined, undefined, true)).toBe("SELECT * FROM `mydb`.`users`");
});
it("qualifies and quotes a PostgreSQL table with its schema", () => {
expect(buildSelectAllSql("postgres", { schema: "public", tableName: "users" })).toBe('SELECT * FROM "public"."users"');
});