order

package
v0.0.0-...-2ebbeb6 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ASC  = "ASC"
	DESC = "DESC"
)

Variables

View Source
var ErrUnkownDirection = errors.New("unknown direction")
View Source
var ErrUnkownOrder = errors.New("unknown order")

Functions

This section is empty.

Types

type By

type By struct {
	Field     string
	Direction string
}

func MustParse

func MustParse(fieldMappings map[string]string, orderBy string, defaultOrder By) By

func NewBy

func NewBy(field string, direction string) By

func Parse

func Parse(fieldMappings map[string]string, orderBy string, defaultOrder By) (By, error)

func (By) PGX

func (b By) PGX() string

Jump to

Keyboard shortcuts

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