Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultSortStrategy ¶
type DefaultSortStrategy struct{}
func (*DefaultSortStrategy) Supports ¶
func (s *DefaultSortStrategy) Supports(field string) bool
type RelatedFieldSortStrategy ¶
type RelatedFieldSortStrategy struct {
FieldPattern string
OrderClause string
AlreadyJoined *bool
// contains filtered or unexported fields
}
func (*RelatedFieldSortStrategy) Supports ¶
func (s *RelatedFieldSortStrategy) Supports(field string) bool
type SortOption ¶
func NewSortOption ¶
func NewSortOption(field, direction string) *SortOption
func NewSortOptionWithDefaults ¶
func NewSortOptionWithDefaults() *SortOption
func ParseSortString ¶
func ParseSortString(sortStr string, validFields []string) *SortOption
ParseSortString парсит строку сортировки и валидирует поля
func (*SortOption) GetOrderClause ¶
func (o *SortOption) GetOrderClause() string
func (*SortOption) ReplaceFieldIfExists ¶
func (s *SortOption) ReplaceFieldIfExists(oldPart, newPart string) *SortOption
ReplaceFieldIfExists заменяет часть поля сортировки, если она присутствует
Click to show internal directories.
Click to hide internal directories.