Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zGo
Commits
156d4a2a
Commit
156d4a2a
authored
Sep 22, 2025
by
Vladimir Barsukov
Browse files
fix tx.Exec
parent
b8fb16a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
zdb/tx.go
View file @
156d4a2a
...
...
@@ -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
...
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment