fix(editor): honor keyword case when pasting IN values

This commit is contained in:
zipg authored and GitHub committed 2026-08-02 10:08:22 +08:00
1 parent 9b05158c9a
commit fdba3301b4
3 files changed
+17 -3

No files matched your search

@@ -10,6 +10,19 @@ describe("sqlInListPaste", () => {
});
});
it("uses the configured SQL keyword case", () => {
expect(buildSqlInConditionFromPasteSource("A\nB", "lower")).toEqual({
ok: true,
sql: "in ('A', 'B')",
valueCount: 2,
});
expect(buildSqlInConditionFromPasteSource("A\nB", "upper")).toEqual({
ok: true,
sql: "IN ('A', 'B')",
valueCount: 2,
});
});
it("splits comma, tab, and newline separated clipboard content", () => {
expect(buildSqlInConditionFromPasteSource("A\tB\nC,D")).toEqual({
ok: true,