updated dependencies and go
This commit is contained in:
+5
-6
@@ -3,9 +3,8 @@ package sq
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/exerr"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -111,7 +110,7 @@ func (tx *transaction) Exec(ctx context.Context, sqlstr string, prep PP) (sql.Re
|
||||
|
||||
preMeta := PreExecMeta{Context: ctx, TransactionConstructorContext: tx.constructorContext}
|
||||
for _, v := range tx.db.lstr {
|
||||
err := v.PreExec(ctx, langext.Ptr(tx.id), &sqlstr, &prep, preMeta)
|
||||
err := v.PreExec(ctx, new(tx.id), &sqlstr, &prep, preMeta)
|
||||
if err != nil {
|
||||
return nil, exerr.Wrap(err, "failed to call SQL pre-exec listener").Int("tx.id", int(tx.id)).Str("original_sql", origsql).Str("sql", sqlstr).Any("sql_params", prep).Build()
|
||||
}
|
||||
@@ -128,7 +127,7 @@ func (tx *transaction) Exec(ctx context.Context, sqlstr string, prep PP) (sql.Re
|
||||
|
||||
postMeta := PostExecMeta{Context: ctx, TransactionConstructorContext: tx.constructorContext, Init: t0, Start: t1, End: time.Now()}
|
||||
for _, v := range tx.db.lstr {
|
||||
v.PostExec(langext.Ptr(tx.id), origsql, sqlstr, prep, err, postMeta)
|
||||
v.PostExec(new(tx.id), origsql, sqlstr, prep, err, postMeta)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@@ -144,7 +143,7 @@ func (tx *transaction) Query(ctx context.Context, sqlstr string, prep PP) (*sqlx
|
||||
|
||||
preMeta := PreQueryMeta{Context: ctx, TransactionConstructorContext: tx.constructorContext}
|
||||
for _, v := range tx.db.lstr {
|
||||
err := v.PreQuery(ctx, langext.Ptr(tx.id), &sqlstr, &prep, preMeta)
|
||||
err := v.PreQuery(ctx, new(tx.id), &sqlstr, &prep, preMeta)
|
||||
if err != nil {
|
||||
return nil, exerr.Wrap(err, "failed to call SQL pre-query listener").Int("tx.id", int(tx.id)).Str("original_sql", origsql).Str("sql", sqlstr).Any("sql_params", prep).Build()
|
||||
}
|
||||
@@ -161,7 +160,7 @@ func (tx *transaction) Query(ctx context.Context, sqlstr string, prep PP) (*sqlx
|
||||
|
||||
postMeta := PostQueryMeta{Context: ctx, TransactionConstructorContext: tx.constructorContext, Init: t0, Start: t1, End: time.Now()}
|
||||
for _, v := range tx.db.lstr {
|
||||
v.PostQuery(langext.Ptr(tx.id), origsql, sqlstr, prep, err, postMeta)
|
||||
v.PostQuery(new(tx.id), origsql, sqlstr, prep, err, postMeta)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user