v0.0.389
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled
This commit is contained in:
@@ -3,22 +3,11 @@ package sq
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
ct "gogs.mikescher.com/BlackForestBytes/goext/cursortoken"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/exerr"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
pag "gogs.mikescher.com/BlackForestBytes/goext/pagination"
|
||||
)
|
||||
|
||||
type PaginateFilter interface {
|
||||
SQL(params PP) (filterClause string, joinClause string, joinTables []string)
|
||||
Sort() []FilterSort
|
||||
}
|
||||
|
||||
type FilterSort struct {
|
||||
Field string
|
||||
Direction ct.SortDirection
|
||||
}
|
||||
|
||||
func Paginate[TData any](ctx context.Context, q Queryable, table string, filter PaginateFilter, scanMode StructScanMode, scanSec StructScanSafety, page int, limit *int) ([]TData, pag.Pagination, error) {
|
||||
prepParams := PP{}
|
||||
|
||||
|
Reference in New Issue
Block a user