This commit is contained in:
azw 2023-08-20 15:01:13 +08:00
parent 97d2608346
commit 86ccb185b4

View File

@ -275,7 +275,7 @@ func (this *dbPool) internalQuery(dataSource string, sql string, params []string
cb QueryResultCb) { cb QueryResultCb) {
ds := this.borrowConn(dataSource) ds := this.borrowConn(dataSource)
if ds == nil { if ds == nil {
cb(errors.New("borrowConn error"), int64(0), int64(0)) cb(errors.New("borrowConn error"), nil)
return return
} }
rows, err := ds.conn.Query(sql, q5.ToInterfaces(params)...) rows, err := ds.conn.Query(sql, q5.ToInterfaces(params)...)
@ -295,7 +295,7 @@ func (this *dbPool) internalQueryOne(dataSource string, sql string, params []str
cb QueryOneCb) { cb QueryOneCb) {
ds := this.borrowConn(dataSource) ds := this.borrowConn(dataSource)
if ds == nil { if ds == nil {
cb(errors.New("borrowConn error"), int64(0), int64(0)) cb(errors.New("borrowConn error"), nil)
return return
} }
rows, err := ds.conn.Query(sql, q5.ToInterfaces(params)...) rows, err := ds.conn.Query(sql, q5.ToInterfaces(params)...)