order_clause

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(order *Order)

func Column

func Column(column string) Option

func Raw

func Raw() Option

func SortAscending

func SortAscending() Option

func SortDescending

func SortDescending() Option

func SortNone

func SortNone() Option

type Order

type Order struct {
	// contains filtered or unexported fields
}

func Clause

func Clause(options ...Option) *Order

func ParseOrder

func ParseOrder(expressions ...string) []*Order

func (*Order) GetColumn

func (o *Order) GetColumn() string

func (*Order) GetSort

func (o *Order) GetSort() Sort

func (*Order) IsRaw

func (o *Order) IsRaw() bool

func (*Order) SortString

func (o *Order) SortString() string

type Sort

type Sort int8
const (
	None       Sort = 0
	Ascending  Sort = 1
	Descending Sort = 2
)

Jump to

Keyboard shortcuts

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