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
2026-06-06 19:25:41 +03:00
parent 21dd105d9a
commit 4624e84b50
8 changed files with 19 additions and 8 deletions
+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)