Documentation
¶
Index ¶
- func ApplyAll[T any, S ~[]T](q *psql.ViewQuery[T, S], params *QueryParams) *psql.ViewQuery[T, S]
- func ApplyFilter[T any, S ~[]T](q *psql.ViewQuery[T, S], f *Filter) *psql.ViewQuery[T, S]
- func Code(name string) string
- func Order[T any, S ~[]T](q *psql.ViewQuery[T, S], s *Sort) *psql.ViewQuery[T, S]
- func Page[T any, S ~[]T](q *psql.ViewQuery[T, S], pg *Pagination) *psql.ViewQuery[T, S]
- func Slugify(s string) string
- type Filter
- type FilterCondition
- type MatchMode
- type Pagination
- type QueryParams
- type SliceResult
- type Sort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFilter ¶
ApplyFilter applies multiple filter conditions to a query. If no conditions are provided, it does not apply any filters.
Types ¶
type Filter ¶
type Filter struct {
Conditions []FilterCondition
}
type FilterCondition ¶
func (FilterCondition) String ¶
func (c FilterCondition) String() string
type Pagination ¶
type QueryParams ¶
type QueryParams struct {
Pagination
Filter
Sort
}
func (QueryParams) String ¶
func (qp QueryParams) String() string
type SliceResult ¶
func Slice ¶
func Slice[T any](data []T, count int64) SliceResult[T]
Click to show internal directories.
Click to hide internal directories.