order

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = SortKey{}

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"`
	Keys  field.List `json:"keys" zed:"keys"`
}

func NewSortKey added in v1.8.0

func NewSortKey(order Which, keys field.List) SortKey

func ParseSortKey added in v1.8.0

func ParseSortKey(s string) (SortKey, error)

func (SortKey) Equal added in v1.8.0

func (s SortKey) Equal(to SortKey) bool

func (SortKey) IsNil added in v1.8.0

func (s SortKey) IsNil() bool

func (SortKey) Primary added in v1.8.0

func (s SortKey) Primary() field.Path

func (SortKey) String added in v1.8.0

func (s SortKey) String() string

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