Commit 156d4a2a authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

fix tx.Exec

parent b8fb16a5
......@@ -2,6 +2,7 @@ package zdb
import (
"context"
"github.com/georgysavva/scany/v2/pgxscan"
"github.com/jackc/pgx/v5"
"github.com/pkg/errors"
......@@ -125,11 +126,11 @@ func (t *Tx) ExecQty(sql string, args ...any) (int, error) {
func (t *Tx) ExecNamedQty(sql string, args map[string]any) (int, error) {
newSql, newArgs := t.pool.prepare(sql, args)
return t.ExecQty(newSql, newArgs)
return t.ExecQty(newSql, newArgs...)
}
func (t *Tx) ExecOptsQty(opts Opts) (int, error) {
sql, args := opts.Opts()
newSql, newArgs := t.pool.prepare(sql, args)
return t.ExecQty(newSql, newArgs)
return t.ExecQty(newSql, newArgs...)
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment