Versions in this module Expand all Collapse all v0 v0.2.0 Mar 2, 2026 Changes in this version + const DefaultPageSize + const MaxPageSize + func ApplyConditions(db *gorm.DB, conditions []Condition, config Config) *gorm.DB + func ApplyIncludes(db *gorm.DB, includes IncludeSet, config IncludeConfig) *gorm.DB + func ApplyIncludesFromParams(db *gorm.DB, params Params, config Config) *gorm.DB + func ComputeFacetsWithFilters(db *gorm.DB, facetFields []string, conditions []Condition, config Config) map[string]map[string]int + type Condition struct + Field string + Operator Operator + Value string + Values []string + type Config struct + AllowedFilters []string + AllowedSortFields []string + DefaultSort string + FacetFields []string + FacetLabels map[string]string + FieldAliases map[string]string + IncludeConfig IncludeConfig + SearchFields []string + func (c Config) ResolveFacetLabel(field string) string + func (c Config) ResolveField(field string) string + type FilterQuery struct + Conditions []Condition + FreeText string + type IncludeConfig struct + AllowedPaths []string + MaxDepth int + Specs map[string]IncludeSpec + func DefaultIncludeConfig() IncludeConfig + func (c IncludeConfig) IsPathAllowed(path string) bool + type IncludePath struct + Parts []string + Raw string + func (p IncludePath) Child() IncludePath + func (p IncludePath) Depth() int + func (p IncludePath) HasChildren() bool + func (p IncludePath) Root() string + type IncludeSet struct + ByRoot map[string][]IncludePath + Paths []IncludePath + func ParseIncludes(includeStr string, config IncludeConfig) IncludeSet + func ParseIncludesFromRequest(r *http.Request, config IncludeConfig) IncludeSet + func (s IncludeSet) ChildrenOf(root string) []IncludePath + func (s IncludeSet) Has(path string) bool + func (s IncludeSet) HasExact(path string) bool + func (s IncludeSet) IsEmpty() bool + type IncludeSpec struct + Nested map[string]IncludeSpec + OrderBy string + Relation string + Type RelationType + type Operator string + const OpEq + const OpGt + const OpGte + const OpIlike + const OpIn + const OpLike + const OpLt + const OpLte + const OpNeq + const OpNin + const OpNotNull + const OpNull + func AllOperators() []Operator + func (o Operator) IsValid() bool + type Pagination struct + Page int + PageSize int + Total int + TotalPages int + type Params struct + Includes IncludeSet + NoPagination bool + Page int + PageSize int + Query FilterQuery + SortBy string + SortOrder string + func ParseFromRequest(r *http.Request, config Config) Params + func (p *Params) AddCondition(field string, op Operator, value string) + type RelationType string + const RelationBelongsTo + const RelationHasMany + const RelationHasOne + type Result struct + Data []T + Facets map[string]map[string]int + Pagination Pagination + func ApplyToGorm[T any](db *gorm.DB, params Params, config Config) (*Result[T], error)