order

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = Layout{}

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 Layout

type Layout struct {
	Order Which      `json:"order" zed:"order"`
	Keys  field.List `json:"keys" zed:"keys"`
}

func NewLayout

func NewLayout(order Which, keys field.List) Layout

func ParseLayout

func ParseLayout(s string) (Layout, error)

func (Layout) Equal

func (l Layout) Equal(to Layout) bool

func (Layout) IsNil

func (l Layout) IsNil() bool

func (Layout) Primary

func (l Layout) Primary() field.Path

func (Layout) String

func (l Layout) String() string

type Which

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

func Parse

func Parse(s string) (Which, error)

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