Browse Source

Fix params error

Volodymyr Tkach 2 years ago
parent
commit
fcd0c2e901
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gosql/common/dbmethods.go

+ 1 - 1
gosql/common/dbmethods.go

@@ -89,7 +89,7 @@ func (d *DBMethods) Exec(ctx context.Context, query string, args ...any) (sql.Re
 }
 
 func (d *DBMethods) ExecPrepared(ctx context.Context, prep *Prepared) (sql.Result, error) {
-	return d.Exec(ctx, prep.Query, prep.Query)
+	return d.Exec(ctx, prep.Query, prep.Args...)
 }
 
 func (d *DBMethods) InsertRow(ctx context.Context, row any) error {