limitspec

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

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 `json:"type,omitempty"`
}

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:"dimension,omitempty"`
	Direction      Direction              `json:"direction,omitempty"`
	DimensionOrder types.StringComparator `json:"dimensionOrder,omitempty"`
}

Jump to

Keyboard shortcuts

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