From b588b7e6d476628f4758bfdf99318d6917c56e64 Mon Sep 17 00:00:00 2001 From: xing Date: Tue, 21 Feb 2023 20:27:29 +0800 Subject: [PATCH] ... --- model/querycondition.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/model/querycondition.go b/model/querycondition.go index d1b13e3..d391f7e 100644 --- a/model/querycondition.go +++ b/model/querycondition.go @@ -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) +}