added some extra known write query keywords to the slq api and hide the Affected rows in case empty to avoid ambiguities

This commit is contained in:
Gani Georgiev committed 2026-06-06 19:25:41 +03:00
1 parent 21dd105d9a
commit 4624e84b50
8 files changed
+19 -8

No files matched your search

+4 -1
View File
@@ -73,7 +73,10 @@ type runSQLResult struct {
Rows [][]any `json:"rows"`
}
var knownWriteQueryPrefixes = []string{"INSERT", "CREATE", "UPDATE", "DELETE", "DROP", "DETACH"}
var knownWriteQueryPrefixes = []string{
"INSERT", "CREATE", "UPDATE", "DELETE",
"DROP", "DETACH", "ALTER", "REPLACE",
}
func executeQuery(app core.App, query string, maxRows int) (*runSQLResult, error) {
query = strings.TrimSpace(query)