v0.0.408
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m43s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m43s
This commit is contained in:
parent
4a33986b6a
commit
645113d553
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.407"
|
||||
const GoextVersion = "0.0.408"
|
||||
|
||||
const GoextVersionTimestamp = "2024-03-11T16:40:41+0100"
|
||||
const GoextVersionTimestamp = "2024-03-11T16:41:47+0100"
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/exerr"
|
||||
)
|
||||
|
||||
func Iterate[TData any](ctx context.Context, q Queryable, table string, filter PaginateFilter, scanMode StructScanMode, scanSec StructScanSafety, page int, limit *int, consumer func(v TData) error) (int, error) {
|
||||
func Iterate[TData any](ctx context.Context, q Queryable, table string, filter PaginateFilter, scanMode StructScanMode, scanSec StructScanSafety, page int, limit *int, consumer func(ctx context.Context, v TData) error) (int, error) {
|
||||
if filter == nil {
|
||||
filter = NewEmptyPaginateFilter()
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ func ScanAll[TData any](ctx context.Context, q Queryable, rows *sqlx.Rows, mode
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func IterateAll[TData any](ctx context.Context, q Queryable, rows *sqlx.Rows, mode StructScanMode, sec StructScanSafety, close bool, consumer func(v TData) error) (int, error) {
|
||||
func IterateAll[TData any](ctx context.Context, q Queryable, rows *sqlx.Rows, mode StructScanMode, sec StructScanSafety, close bool, consumer func(ctx context.Context, v TData) error) (int, error) {
|
||||
var strscan *StructScanner
|
||||
|
||||
if sec == Safe {
|
||||
@ -370,7 +370,7 @@ func IterateAll[TData any](ctx context.Context, q Queryable, rows *sqlx.Rows, mo
|
||||
return rcount, err
|
||||
}
|
||||
|
||||
err = consumer(data)
|
||||
err = consumer(ctx, data)
|
||||
if err != nil {
|
||||
return rcount, exerr.Wrap(err, "").Build()
|
||||
}
|
||||
@ -384,7 +384,7 @@ func IterateAll[TData any](ctx context.Context, q Queryable, rows *sqlx.Rows, mo
|
||||
return rcount, err
|
||||
}
|
||||
|
||||
err = consumer(data)
|
||||
err = consumer(ctx, data)
|
||||
if err != nil {
|
||||
return rcount, exerr.Wrap(err, "").Build()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user