Documentation ¶
Index ¶
Constants ¶
View Source
const ( ASC = "$asc" DESC = "$desc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ordering ¶
type Ordering = []SortField
func UnmarshalSort ¶
func UnmarshalSort(input jsoniter.RawMessage) (*Ordering, error)
UnmarshalSort expects a json array input. Examples:
[{"field_1": "$asc"}, {"field_2": "$desc"}] []
type SortField ¶
type SortField struct { // Required; Name of field to enable sorting for Name string // Required; True if ascending order is requested, False for descending Ascending bool // Optional; True if missing/empty/null values to be presented at the top of sort order, // else they are sorted to the end by default MissingValuesFirst bool }
Click to show internal directories.
Click to hide internal directories.