limitspec

package
Version: v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(data []byte) (builder.LimitSpec, error)

Types

type Base

type Base struct {
	Typ builder.ComponentType
}

func (*Base) SetType

func (b *Base) SetType(typ builder.ComponentType) *Base

func (*Base) Type

func (b *Base) Type() builder.ComponentType

type Default

type Default struct {
	Base
	Columns []OrderByColumnSpec `json:"columns,omitempty"`
	Offset  int                 `json:"offset,omitempty"`
	Limit   int                 `json:"limit,omitempty"`
}

func NewDefault

func NewDefault() *Default

func (*Default) SetColumns

func (d *Default) SetColumns(columns []OrderByColumnSpec) *Default

func (*Default) SetLimit

func (d *Default) SetLimit(limit int) *Default

func (*Default) SetOffset

func (d *Default) SetOffset(offset int) *Default

type Direction

type Direction string
const (
	Ascending  Direction = "ASCENDING"
	Descending           = "DESCENDING"
)

type OrderByColumnSpec

type OrderByColumnSpec struct {
	Dimension           string `json:"string,omitempty"`
	Direction           Direction
	DimensionComparator types.StringComparator `json:"dimensionComparator,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL