Documentation
¶
Index ¶
- func Identity(node node.Node) node.Node
- func NewSelector(name string) node.Node
- type Binary
- func (b *Binary) HasIdentifier() bool
- func (b *Binary) HasPlaceholder() bool
- func (b *Binary) Ident() *Ident
- func (b *Binary) Identifier() node.Node
- func (b *Binary) Normalize() *Binary
- func (b *Binary) Parenthesis() *Parenthesis
- func (b *Binary) Placeholder() *Placeholder
- func (b *Binary) Predicate() (node.Node, *Values, error)
- func (b *Binary) SelectorIdent(root string) *Ident
- func (b *Binary) Values() (*Values, error)
- func (b *Binary) Walk(...) error
- type Call
- type Case
- type Collate
- type FieldAccess
- type Ident
- type Literal
- type NullTreatment
- type Parenthesis
- type Placeholder
- type Qualify
- type Range
- type Raw
- type Selector
- type Star
- type Subscript
- type Switch
- type Unary
- type Value
- type Values
- type Window
- type WindowBound
- type WindowFrame
- type WindowOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Binary ¶
Binary represents binary expr
func (*Binary) HasIdentifier ¶ added in v0.3.0
HasIdentifier returns true if x or y opperand is identity
func (*Binary) HasPlaceholder ¶
HasPlaceholder returns true if x or y operand is placeholder
func (*Binary) Identifier ¶ added in v0.3.0
Identifier returns an identifier node or nil
func (*Binary) Parenthesis ¶
func (b *Binary) Parenthesis() *Parenthesis
Parenthesis returns parenthesis
func (*Binary) Placeholder ¶ added in v0.7.0
func (b *Binary) Placeholder() *Placeholder
Placeholder returns placeholder
func (*Binary) SelectorIdent ¶ added in v0.7.1
type Call ¶
Call represents a call. Named arguments are *Binary nodes with Op "=>", a *Raw argument name in X, and the argument expression in Y.
type Case ¶
Case represents a WHEN condition (X) and THEN result (Y). A first entry with only X holds a simple CASE selector; an entry with only Y holds ELSE. This keeps all expressions traversable without changing the public Switch or Case field layout.
type FieldAccess ¶ added in v0.13.1
FieldAccess selects a field of a computed value, such as an array element.
type Literal ¶
Literal represents a literal
func NewNumericLiteral ¶
NewNumericLiteral returns numeric literal
func NewStringLiteral ¶
NewStringLiteral returns string literal
type NullTreatment ¶ added in v0.13.1
NullTreatment applies IGNORE NULLS or RESPECT NULLS to an aggregate argument.
type Parenthesis ¶
Parenthesis represents parenthesis expr
func NewParenthesis ¶
func NewParenthesis(raw string) *Parenthesis
NewParenthesis returns a parenthesis expr
type Placeholder ¶
Placeholder represetns a placeholder
func NewPlaceholder ¶
func NewPlaceholder(name string) *Placeholder
NewPlaceholder returns a placeholder
type Window ¶ added in v0.13.1
type Window struct {
X node.Node
PartitionBy []node.Node
OrderBy []*WindowOrder
Frame *WindowFrame
}
Window is a function call with an inline OVER specification.
type WindowBound ¶ added in v0.13.1
WindowBound is CURRENT ROW, UNBOUNDED PRECEDING/FOLLOWING, or an offset bound.
type WindowFrame ¶ added in v0.13.1
type WindowFrame struct {
Unit string
Start, End *WindowBound
}
WindowFrame represents ROWS or RANGE, with an optional BETWEEN end bound.
type WindowOrder ¶ added in v0.13.1
WindowOrder is an expression and its optional ASC/DESC direction.