feat(editor): support executing all SQL from blank lines

This commit is contained in:
zipg authored and GitHub committed 2026-08-10 18:26:39 +08:00
1 parent a9736f0ffc
commit a83f32d13f
18 files changed
+82 -11

No files matched your search

@@ -23,6 +23,13 @@ describe("executionCandidateForMode", () => {
expect(executionCandidateForMode([all], "all")).toBe(all);
});
it("falls back to all SQL only when blank-line execution is enabled", () => {
const all = candidate("all", ["all"]);
expect(executionCandidateForMode([all], "current", { executeAllOnBlankLine: false })).toBeNull();
expect(executionCandidateForMode([all], "current", { executeAllOnBlankLine: true })).toBe(all);
});
it("uses the deduplicated candidate when one statement is both current and all", () => {
const currentAndAll = candidate("all", ["cursor", "all"]);