fix(oracle): classify minus queries as set operations

This commit is contained in:
t8y2 committed 2026-07-27 21:18:16 +08:00
1 parent 0be9bcef12
commit a5eb6fd1fa
3 files changed
+45 -2

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ export function analyzeEditableQueryEditability(sql: string): QueryEditability {
if (!normalized) return { editable: false, reason: "not-select" };
if (/^\s*WITH\b/i.test(normalized)) return { editable: false, reason: "cte" };
if (!/^SELECT\b/i.test(normalized)) return { editable: false, reason: "not-select" };
if (hasTopLevelKeyword(normalized, ["UNION", "INTERSECT", "EXCEPT"])) {
if (hasTopLevelKeyword(normalized, ["UNION", "INTERSECT", "EXCEPT", "MINUS"])) {
return { editable: false, reason: "set-operation" };
}
if (normalized.includes(";")) return { editable: false, reason: "complex-source" };