order

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: BSD-3-Clause Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction int
const (
	Down    Direction = -1
	Up      Direction = 1
	Unknown Direction = 0
)

func ParseDirection

func ParseDirection(s string) (Direction, error)

func (Direction) HasOrder

func (d Direction) HasOrder(which Which) bool

func (Direction) MarshalJSON

func (d Direction) MarshalJSON() ([]byte, error)

func (Direction) MarshalZNG

func (d Direction) MarshalZNG(m *zson.MarshalZNGContext) (zed.Type, error)

func (Direction) String

func (d Direction) String() string

func (*Direction) UnmarshalJSON

func (d *Direction) UnmarshalJSON(b []byte) error

func (*Direction) UnmarshalZNG

func (d *Direction) UnmarshalZNG(u *zson.UnmarshalZNGContext, val zed.Value) error

type SortKey added in v1.8.0

type SortKey struct {
	Order Which      `json:"order" zed:"order"`
	Key   field.Path `json:"key" zed:"key"`
}

func NewSortKey added in v1.8.0

func NewSortKey(order Which, key field.Path) SortKey

func (SortKey) Equal added in v1.8.0

func (s SortKey) Equal(to SortKey) bool

func (SortKey) String added in v1.8.0

func (s SortKey) String() string

type SortKeys added in v1.18.0

type SortKeys []SortKey

func ParseSortKeys added in v1.18.0

func ParseSortKeys(s string) (SortKeys, error)

func (SortKeys) Equal added in v1.18.0

func (s SortKeys) Equal(to SortKeys) bool

func (SortKeys) IsNil added in v1.18.0

func (s SortKeys) IsNil() bool

func (SortKeys) Primary added in v1.18.0

func (s SortKeys) Primary() SortKey

type Which

type Which bool
const (
	Asc  Which = false
	Desc Which = true
)

func Parse

func Parse(s string) (Which, error)

func (Which) Direction added in v1.10.0

func (w Which) Direction() Direction

func (Which) MarshalJSON

func (w Which) MarshalJSON() ([]byte, error)

func (Which) MarshalZNG

func (w Which) MarshalZNG(m *zson.MarshalZNGContext) (zed.Type, error)

func (Which) String

func (w Which) String() string

func (*Which) UnmarshalJSON

func (w *Which) UnmarshalJSON(b []byte) error

func (*Which) UnmarshalZNG

func (w *Which) UnmarshalZNG(u *zson.UnmarshalZNGContext, val zed.Value) error

Jump to

Keyboard shortcuts

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