fix: wrong execution
All checks were successful
Gitea Build Check / Build (push) Successful in 2m27s
Gitea Build Check / Build (pull_request) Successful in 2m32s

fixed fucntion to use Exec insted of Raw.
This commit is contained in:
SoXX 2024-07-27 19:49:39 +02:00
parent 470681fd4f
commit d364078acc

View File

@ -16,7 +16,7 @@ func ExecuteRawStatement(ctx context.Context, db *gorm.DB, query string, args ..
return nil, errors.New("arguments can not be nil")
}
result, err := db.WithContext(ctx).Raw(query, args...).Rows()
result, err := db.WithContext(ctx).Exec(query, args...).Rows()
if err != nil {
return nil, err
}