From d364078accf3be6b58f87622a04ec2f6a6621a83 Mon Sep 17 00:00:00 2001 From: SoXX Date: Sat, 27 Jul 2024 19:49:39 +0200 Subject: [PATCH] fix: wrong execution fixed fucntion to use Exec insted of Raw. --- internal/postgres/custom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/postgres/custom.go b/internal/postgres/custom.go index e7e9245..919184f 100644 --- a/internal/postgres/custom.go +++ b/internal/postgres/custom.go @@ -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 }