Documentation
¶
Overview ¶
Package sorts contains query sort order structures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxNestedRelLevel = 1
MaxNestedRelLevel is a temporary maximum nested check while creating sort fields TODO: change the variable into config settable.
Functions ¶
This section is empty.
Types ¶
type SortField ¶
type SortField struct {
// contains filtered or unexported fields
}
SortField is a field that describes the sorting rules for given query.
func NewRawSortField ¶
NewRawSortField creates and returns new sort field for given model 'm', with sort field value 'sort' and a flag if foreign key should be disallowed - 'disallowFK'
func NewSortField ¶
func NewSortField(sField *models.StructField, o Order, subs ...*SortField) *SortField
NewSortField creates new SortField with given models.StructField 'sField', order 'o' and sub sort fields: 'subs'.
func (*SortField) SetSubfield ¶ added in v0.2.1
func (s *SortField) SetSubfield(sortSplitted []string, order Order, disallowFK bool) errors.DetailedError
SetSubfield sets the subfield for given sortfield
func (*SortField) StructField ¶
func (s *SortField) StructField() *models.StructField
StructField returns sortField's model.StructField.
Click to show internal directories.
Click to hide internal directories.