fix(grid): allow deleting rows from DISTINCT join results

This commit is contained in:
zipg authored and GitHub committed 2026-09-02 11:18:44 +08:00
1 parent 103e221cc3
commit 10ac216964
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -4432,7 +4432,11 @@ export const useQueryStore = defineStore("query", () => {
const queryAnalysis = {
...target.analysis,
...(target.analysis.distinct && canInsertIntoEditableQuerySource(tab, dbType as DatabaseType, target, target.sourceColumns) ? { allowInsert: true } : {}),
allowDelete: !target.analysis.distinct,
// A DISTINCT result is still one-to-one with the selected source row
// when that source's complete primary key is present in the projection.
// The candidate filter above guarantees that identity before enabling
// the primary-key based delete SQL.
allowDelete: true,
allowInsertDelete: false,
multiSource: true,
};