query

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 7 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type From

type From struct {
	expr.Raw
	Alias    string
	X        node.Node
	Comments string
}

From represetns from

type GroupBy

type GroupBy struct {
	Items List
}

GroupBy represetns a group by

type Item

type Item struct {
	Expr      node.Node
	Alias     string
	Comments  string
	DataType  string
	Raw       string
	Meta      interface{}
	Tag       string
	Direction string
}

Item represents an inte,

func NewItem

func NewItem(expr node.Node) *Item

NewItem returns an item

type Join

type Join struct {
	Kind     string
	Alias    string
	Raw      string
	With     node.Node
	On       *expr.Qualify
	Comments string
}

func NewJoin

func NewJoin(raw string) *Join

type List

type List []*Item

List represents a list

func (*List) Append

func (l *List) Append(item *Item)

Append appends to the list

func (List) IsStarExpr

func (l List) IsStarExpr() bool

IsStarExpr returns true if start expr

type Order

type Order struct {
	Item
	Kind string
}

Order represents an order node

type Select

type Select struct {
	List        List
	From        From
	Joins       []*Join
	Qualify     *expr.Qualify
	GroupBy     List
	Having      *expr.Qualify
	OrderBy     List
	Window      *expr.Raw
	Limit       *expr.Literal
	Offset      *expr.Literal
	Kind        string
	Union       *Union
	WithSelects WithSelects
}

Select represent a select

func (*Select) IsNested

func (s *Select) IsNested() bool

IsNested returns true is select uses nested query

func (*Select) NestedSelect

func (s *Select) NestedSelect() *Select

type Union added in v0.3.0

type Union struct {
	Kind string
	Raw  string
	X    *Select
}

Union represents an union

type WithSelect added in v0.3.0

type WithSelect struct {
	Raw   string
	Alias string
	X     *Select
}

WithSelects represents WithSelect list

type WithSelects added in v0.3.0

type WithSelects []*WithSelect

WithSelects represents with selects

func (WithSelects) Select added in v0.3.0

func (w WithSelects) Select(alias string) *WithSelect

Select returns with select

Jump to

Keyboard shortcuts

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