sort

package
v1.0.0-beta.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expr

type Expr []Sort

func (Expr) Built

func (o Expr) Built() (driver.SortOrder, error)

Built serializes the sort order.

type Order

type Order = Expr

func NewSortOrder

func NewSortOrder(sort ...Sort) Order

NewSortOrder creates an array of multiple fields that will be used to sort results.

type Sort

type Sort interface {
	ToSortOrder() map[string]string
	FieldName() string
}

func Ascending

func Ascending(fieldName string) Sort

Ascending builds an increasing order for given field name.

func Descending

func Descending(fieldName string) Sort

Descending builds a decreasing order for given field name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL