This commit is contained in:
xing 2023-02-21 20:27:29 +08:00
parent 56f869c10f
commit b588b7e6d4

View File

@ -271,3 +271,11 @@ func findScanner[T Model](db dbQuery, ctx context.Context, fn func(T), q *QueryC
err = db.Select(ctx, &v, s, args...)
return
}
func FindScannerFromDB[T Model](db dbQuery, ctx context.Context, fn func(T), q *QueryCondition) error {
return findScanner[T](db, ctx, fn, q)
}
func FindScanner[T Model](ctx context.Context, fn func(T), q *QueryCondition) error {
return findScanner[T](globalBb, ctx, fn, q)
}