forked from ebhomengo/niki
1
0
Fork 0

fix(niki): make querier type safer

This commit is contained in:
Iman Mirazimi 2024-07-17 14:34:42 +03:30
parent b6eca45519
commit 4eadf98c2e
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ func (q *querier) Begin() *querier {
q.txRequested.Store(true)
return q
}
func (q *querier) Continue(ctx context.Context, conn conn) (*querier, error) {
func (q *querier) Continue(ctx context.Context, conn *SqlDB) (*querier, error) {
var iErr error
q.initOnce.Do(func() {
if q.txRequested.Load() {
@ -54,7 +54,7 @@ func (q *querier) Continue(ctx context.Context, conn conn) (*querier, error) {
}
q.conn = &SqlTx{tx}
} else {
q.conn = conn.(*SqlDB)
q.conn = conn
}
})
return q, iErr