Skip to content

Commit d4666b6

Browse files
committed
Handle DELETE
1 parent d373474 commit d4666b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/codegen/golang/gen.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ func readOnly(queries []Query) []Query {
427427
if !strings.Contains(qsql, "SELECT") {
428428
continue
429429
}
430-
if strings.Contains(qsql, "UPDATE") || strings.Contains(qsql, "INSERT") {
430+
if strings.Contains(qsql, "INSERT") ||
431+
strings.Contains(qsql, "UPDATE") ||
432+
strings.Contains(qsql, "DELETE") {
431433
continue
432434
}
433435

0 commit comments

Comments
 (0)