fix(oracle): classify minus queries as set operations

This commit is contained in:
t8y2
2026-07-27 21:18:16 +08:00
parent 0be9bcef12
commit a5eb6fd1fa
3 changed files with 45 additions and 2 deletions
+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" };