tree

package
v0.0.0-...-4d2ef29 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AstWhere  = "WHERE"
	AstHaving = "HAVING"
)

Where.Type

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasClause

type AliasClause struct {
	Alias Name
	Cols  NameList
}

func (*AliasClause) String

func (n *AliasClause) String() string

type AliasedSelect

type AliasedSelect struct {
	Sel *Select
	As  *AliasClause
}

func (*AliasedSelect) String

func (n *AliasedSelect) String() string

type AliasedTable

type AliasedTable struct {
	As  *AliasClause
	Tbl TableStatement
}

func (*AliasedTable) String

func (n *AliasedTable) String() string

type AndExpr

type AndExpr struct {
	Left, Right ExprStatement
}

func (*AndExpr) String

func (e *AndExpr) String() string

type BetweenExpr

type BetweenExpr struct {
	E        ExprStatement
	From, To ExprStatement
}

func (*BetweenExpr) String

func (e *BetweenExpr) String() string

type ColunmName

type ColunmName struct {
	Path  Name
	Index ExprStatement
}

func (ColunmName) String

func (n ColunmName) String() string

type ColunmNameList

type ColunmNameList []ColunmName

func (ColunmNameList) String

func (n ColunmNameList) String() string

type Direction

type Direction int8

Direction for ordering results.

const (
	DefaultDirection Direction = iota
	Ascending
	Descending
)

Direction values.

func (Direction) String

func (i Direction) String() string

type DivExpr

type DivExpr struct {
	Left, Right ExprStatement
}

func (*DivExpr) String

func (e *DivExpr) String() string

type EqExpr

type EqExpr struct {
	Left, Right ExprStatement
}

func (*EqExpr) String

func (e *EqExpr) String() string

type ExprStatement

type ExprStatement interface {
	Statement
	// contains filtered or unexported methods
}

type ExprStatements

type ExprStatements []ExprStatement

func (ExprStatements) String

func (es ExprStatements) String() string

type From

type From struct {
	Tables TableStatements
}

func (*From) String

func (n *From) String() string

type FuncExpr

type FuncExpr struct {
	Name string
	Es   ExprStatements
}

func (*FuncExpr) String

func (e *FuncExpr) String() string

type GeExpr

type GeExpr struct {
	Left, Right ExprStatement
}

func (*GeExpr) String

func (e *GeExpr) String() string

type GroupBy

type GroupBy struct {
	Es ExprStatements
}

func (*GroupBy) String

func (n *GroupBy) String() string

type GtExpr

type GtExpr struct {
	Left, Right ExprStatement
}

func (*GtExpr) String

func (e *GtExpr) String() string

type IsNotNullExpr

type IsNotNullExpr struct {
	E ExprStatement
}

func (*IsNotNullExpr) String

func (e *IsNotNullExpr) String() string

type IsNullExpr

type IsNullExpr struct {
	E ExprStatement
}

func (*IsNullExpr) String

func (e *IsNullExpr) String() string

type JoinClause

type JoinClause struct {
	Type        JoinType
	Cond        JoinCond
	Left, Right RelationStatement
}

func (*JoinClause) String

func (n *JoinClause) String() string

type JoinCond

type JoinCond interface {
	Statement
	// contains filtered or unexported methods
}

JoinCond represents a join condition.

type JoinType

type JoinType int
const (
	FullOp JoinType = iota
	LeftOp
	RightOp
	CrossOp
	InnerOp
	NaturalOp
)

func (JoinType) String

func (i JoinType) String() string

type LeExpr

type LeExpr struct {
	Left, Right ExprStatement
}

func (*LeExpr) String

func (e *LeExpr) String() string

type Limit

type Limit struct {
	Offset, Count ExprStatement
}

func (*Limit) String

func (n *Limit) String() string

type LtExpr

type LtExpr struct {
	Left, Right ExprStatement
}

func (*LtExpr) String

func (e *LtExpr) String() string

type MinusExpr

type MinusExpr struct {
	Left, Right ExprStatement
}

func (*MinusExpr) String

func (e *MinusExpr) String() string

type ModExpr

type ModExpr struct {
	Left, Right ExprStatement
}

func (*ModExpr) String

func (e *ModExpr) String() string

type MultExpr

type MultExpr struct {
	Left, Right ExprStatement
}

func (*MultExpr) String

func (e *MultExpr) String() string

type Name

type Name string

func (Name) String

func (n Name) String() string

type NameList

type NameList []Name

func (NameList) String

func (n NameList) String() string

type NeExpr

type NeExpr struct {
	Left, Right ExprStatement
}

func (*NeExpr) String

func (e *NeExpr) String() string

type NonJoinCond

type NonJoinCond struct {
}

func (*NonJoinCond) String

func (n *NonJoinCond) String() string

type NotBetweenExpr

type NotBetweenExpr struct {
	E        ExprStatement
	From, To ExprStatement
}

func (*NotBetweenExpr) String

func (e *NotBetweenExpr) String() string

type NotExpr

type NotExpr struct {
	E ExprStatement
}

func (*NotExpr) String

func (e *NotExpr) String() string

type OnJoinCond

type OnJoinCond struct {
	E ExprStatement
}

OnJoinCond represents an ON join condition.

func (*OnJoinCond) String

func (n *OnJoinCond) String() string

type OrExpr

type OrExpr struct {
	Left, Right ExprStatement
}

func (*OrExpr) String

func (e *OrExpr) String() string

type Order

type Order struct {
	Type Direction
	E    ExprStatement
}

func (*Order) String

func (n *Order) String() string

type OrderBy

type OrderBy []*Order

func (OrderBy) String

func (n OrderBy) String() string

type PlusExpr

type PlusExpr struct {
	Left, Right ExprStatement
}

func (*PlusExpr) String

func (e *PlusExpr) String() string

type RelationStatement

type RelationStatement interface {
	Statement
	// contains filtered or unexported methods
}

type Select

type Select struct {
	Limit    *Limit
	OrderBy  OrderBy
	Relation RelationStatement
}

func (*Select) String

func (n *Select) String() string

type SelectClause

type SelectClause struct {
	Distinct bool
	From     *From
	Where    *Where
	Having   *Where
	GroupBy  *GroupBy
	Sel      SelectExprs
}

func (*SelectClause) String

func (n *SelectClause) String() string

type SelectExpr

type SelectExpr struct {
	As Name
	E  ExprStatement
}

func (*SelectExpr) String

func (n *SelectExpr) String() string

type SelectExprs

type SelectExprs []*SelectExpr

func (SelectExprs) String

func (n SelectExprs) String() string

type Statement

type Statement interface {
	String() string
}

type Subquery

type Subquery struct {
	Exists bool
	Select *Select
}

func (*Subquery) String

func (n *Subquery) String() string

type TableName

type TableName struct {
	N ColunmNameList
}

func (*TableName) String

func (n *TableName) String() string

type TableStatement

type TableStatement interface {
	Statement
	// contains filtered or unexported methods
}

type TableStatements

type TableStatements []TableStatement

func (TableStatements) String

func (n TableStatements) String() string

type UnaryMinusExpr

type UnaryMinusExpr struct {
	E ExprStatement
}

func (*UnaryMinusExpr) String

func (e *UnaryMinusExpr) String() string

type UnionClause

type UnionClause struct {
	All         bool
	Type        UnionType
	Left, Right RelationStatement
}

func (*UnionClause) String

func (n *UnionClause) String() string

type UnionType

type UnionType int
const (
	UnionOp UnionType = iota
	IntersectOp
	ExceptOp
)

func (UnionType) String

func (i UnionType) String() string

type Value

type Value struct {
	E value.Value
}

func (*Value) String

func (e *Value) String() string

type Where

type Where struct {
	Type string
	E    ExprStatement
}

Where represents a WHERE or HAVING clause.

func (*Where) String

func (n *Where) String() string

Jump to

Keyboard shortcuts

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