Documentation ¶
Index ¶
- Constants
- func RegisterDatabase(db string)
- func RegisterEngine(engine Engine)
- type Aliaser
- type AndNode
- type AsNode
- type AscendingNode
- type AssignmentNode
- type AttributeNode
- func (node *AttributeNode) As(literal SqlLiteralNode) *AsNode
- func (node *AttributeNode) Asc() *AscendingNode
- func (node *AttributeNode) Count() *CountNode
- func (node *AttributeNode) Desc() *DescendingNode
- func (node *AttributeNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node *AttributeNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *AttributeNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *AttributeNode) Eq(visitable Visitable) *EqualityNode
- func (node *AttributeNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node *AttributeNode) Gt(visitable Visitable) *GreaterThanNode
- func (node *AttributeNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node *AttributeNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) In(visitables []Visitable) Visitable
- func (node *AttributeNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node *AttributeNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node *AttributeNode) Lt(visitable Visitable) *LessThanNode
- func (node *AttributeNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node *AttributeNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node *AttributeNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *AttributeNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *AttributeNode) NotEq(visitable Visitable) *NotEqualNode
- func (node *AttributeNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node *AttributeNode) NotIn(visitables []Visitable) Visitable
- func (node *AttributeNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node *AttributeNode) NotInAny(visitableslices ...[]Visitable) Visitable
- type AvgNode
- type BaseVisitable
- func (v BaseVisitable) NewAndNode(n ...Visitable) *AndNode
- func (v BaseVisitable) NewFalseNode() *FalseNode
- func (v BaseVisitable) NewGroupingNode() *GroupingNode
- func (v BaseVisitable) NewInnerJoinNode() *InnerJoinNode
- func (v BaseVisitable) NewNamedFunctionNode() *NamedFunctionNode
- func (v BaseVisitable) NewNotNode() *NotNode
- func (v BaseVisitable) NewOnNode(visitable Visitable) *OnNode
- func (v BaseVisitable) NewOuterJoinNode() *OuterJoinNode
- func (v BaseVisitable) NewTableAliasNode(t *Table, name string) *TableAliasNode
- func (v BaseVisitable) NewTrueNode() *TrueNode
- func (v BaseVisitable) String() string
- type BetweenNode
- type BinNode
- type BinaryNode
- type BindParamNode
- type Connector
- type CountNode
- type CurrentRowNode
- type DefaultConnector
- type DefaultEngine
- type DeleteManager
- type DeleteStatementNode
- type DescendingNode
- type DistinctNode
- type DistinctOnNode
- type DoesNotMatchNode
- type Engine
- type EqualityNode
- type ExceptNode
- type ExistsNode
- func (node ExistsNode) As(literal SqlLiteralNode) *AsNode
- func (node ExistsNode) Asc() *AscendingNode
- func (node ExistsNode) Count() *CountNode
- func (node ExistsNode) Desc() *DescendingNode
- func (node ExistsNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node ExistsNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node ExistsNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node ExistsNode) Eq(visitable Visitable) *EqualityNode
- func (node ExistsNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node ExistsNode) Gt(visitable Visitable) *GreaterThanNode
- func (node ExistsNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node ExistsNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) In(visitables []Visitable) Visitable
- func (node ExistsNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node ExistsNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node ExistsNode) Lt(visitable Visitable) *LessThanNode
- func (node ExistsNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node ExistsNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node ExistsNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node ExistsNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node ExistsNode) NotEq(visitable Visitable) *NotEqualNode
- func (node ExistsNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node ExistsNode) NotIn(visitables []Visitable) Visitable
- func (node ExistsNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node ExistsNode) NotInAny(visitableslices ...[]Visitable) Visitable
- type ExtractNode
- func (node *ExtractNode) As(n SqlLiteralNode) *ExtractNode
- func (node *ExtractNode) Asc() *AscendingNode
- func (node *ExtractNode) Count() *CountNode
- func (node *ExtractNode) Desc() *DescendingNode
- func (node *ExtractNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node *ExtractNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *ExtractNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *ExtractNode) Eq(visitable Visitable) *EqualityNode
- func (node *ExtractNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node *ExtractNode) Gt(visitable Visitable) *GreaterThanNode
- func (node *ExtractNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node *ExtractNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) In(visitables []Visitable) Visitable
- func (node *ExtractNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node *ExtractNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node *ExtractNode) Lt(visitable Visitable) *LessThanNode
- func (node *ExtractNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node *ExtractNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node *ExtractNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *ExtractNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *ExtractNode) NotEq(visitable Visitable) *NotEqualNode
- func (node *ExtractNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node *ExtractNode) NotIn(visitables []Visitable) Visitable
- func (node *ExtractNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node *ExtractNode) NotInAny(visitableslices ...[]Visitable) Visitable
- type FalseNode
- type FollowingNode
- type FunctionNode
- func (node *FunctionNode) Count() *CountNode
- func (node *FunctionNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node *FunctionNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *FunctionNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *FunctionNode) Eq(visitable Visitable) *EqualityNode
- func (node *FunctionNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node *FunctionNode) Gt(visitable Visitable) *GreaterThanNode
- func (node *FunctionNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node *FunctionNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) In(visitables []Visitable) Visitable
- func (node *FunctionNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node *FunctionNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node *FunctionNode) Lt(visitable Visitable) *LessThanNode
- func (node *FunctionNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node *FunctionNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node *FunctionNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node *FunctionNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node *FunctionNode) NotEq(visitable Visitable) *NotEqualNode
- func (node *FunctionNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node *FunctionNode) NotIn(visitables []Visitable) Visitable
- func (node *FunctionNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node *FunctionNode) NotInAny(visitableslices ...[]Visitable) Visitable
- func (node *FunctionNode) Over(visitable Visitable) *OverNode
- type GreaterThanNode
- type GreaterThanOrEqualNode
- type GroupNode
- type GroupingNode
- func (node GroupingNode) As(literal SqlLiteralNode) *AsNode
- func (node GroupingNode) Asc() *AscendingNode
- func (node GroupingNode) Count() *CountNode
- func (node GroupingNode) Desc() *DescendingNode
- func (node GroupingNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node GroupingNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node GroupingNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node GroupingNode) Eq(visitable Visitable) *EqualityNode
- func (node GroupingNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node GroupingNode) Gt(visitable Visitable) *GreaterThanNode
- func (node GroupingNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node GroupingNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) In(visitables []Visitable) Visitable
- func (node GroupingNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node GroupingNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node GroupingNode) Lt(visitable Visitable) *LessThanNode
- func (node GroupingNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node GroupingNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node GroupingNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node GroupingNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node GroupingNode) NotEq(visitable Visitable) *NotEqualNode
- func (node GroupingNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node GroupingNode) NotIn(visitables []Visitable) Visitable
- func (node GroupingNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node GroupingNode) NotInAny(visitableslices ...[]Visitable) Visitable
- type HavingNode
- type InNode
- type InfixOperationNode
- func (node InfixOperationNode) As(literal SqlLiteralNode) *AsNode
- func (node InfixOperationNode) Asc() *AscendingNode
- func (node InfixOperationNode) Count() *CountNode
- func (node InfixOperationNode) Desc() *DescendingNode
- func (node InfixOperationNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node InfixOperationNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node InfixOperationNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node InfixOperationNode) Eq(visitable Visitable) *EqualityNode
- func (node InfixOperationNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node InfixOperationNode) Gt(visitable Visitable) *GreaterThanNode
- func (node InfixOperationNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node InfixOperationNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) In(visitables []Visitable) Visitable
- func (node InfixOperationNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node InfixOperationNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node InfixOperationNode) Lt(visitable Visitable) *LessThanNode
- func (node InfixOperationNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node InfixOperationNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node InfixOperationNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node InfixOperationNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node InfixOperationNode) NotEq(visitable Visitable) *NotEqualNode
- func (node InfixOperationNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node InfixOperationNode) NotIn(visitables []Visitable) Visitable
- func (node InfixOperationNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node InfixOperationNode) NotInAny(visitableslices ...[]Visitable) Visitable
- type InnerJoinNode
- type InsertManager
- func (mgr *InsertManager) CreateValues(values []interface{}, columns []*AttributeNode) *ValuesNode
- func (mgr *InsertManager) Insert(column *AttributeNode, value interface{}) *InsertManager
- func (mgr *InsertManager) Into(table *Table) *InsertManager
- func (mgr *InsertManager) SetValues(values *ValuesNode)
- func (mgr *InsertManager) ToSql() string
- func (mgr *InsertManager) Values(column *AttributeNode, value interface{}) *InsertManager
- type InsertStatementNode
- type IntersectNode
- type JoinNode
- type JoinSource
- type LessThanNode
- type LessThanOrEqualNode
- type LimitNode
- type LockNode
- type MatchesNode
- type MaxNode
- type MinNode
- type MultiStatementManager
- func (mgr *MultiStatementManager) Except(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *MultiStatementManager) Intersect(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *MultiStatementManager) ToSql() string
- func (mgr *MultiStatementManager) Union(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *MultiStatementManager) UnionAll(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- type MysqlVisitor
- func (v MysqlVisitor) Accept(visitable Visitable) string
- func (v MysqlVisitor) Quote(thing interface{}) string
- func (v MysqlVisitor) QuoteColumnName(literal SqlLiteralNode) string
- func (v MysqlVisitor) QuoteTableName(visitable Visitable) string
- func (v MysqlVisitor) Visit(visitable Visitable) string
- type NamedFunctionNode
- type NamedWindowNode
- type NotEqualNode
- type NotInNode
- type NotNode
- type OffsetNode
- type OnNode
- type OrNode
- type Orderer
- type OrderingNode
- type OuterJoinNode
- type OverNode
- type PostgreSQLVisitor
- func (v *PostgreSQLVisitor) Accept(visitable Visitable) string
- func (v PostgreSQLVisitor) Quote(thing interface{}) string
- func (v PostgreSQLVisitor) QuoteColumnName(literal SqlLiteralNode) string
- func (v PostgreSQLVisitor) QuoteTableName(visitable Visitable) string
- func (v *PostgreSQLVisitor) Visit(visitable Visitable) string
- type PrecedingNode
- type Predicator
- type QuotedNode
- type RangeNode
- type RowsNode
- type SQLiteVisitor
- func (v SQLiteVisitor) Accept(visitable Visitable) string
- func (v SQLiteVisitor) Quote(thing interface{}) string
- func (v SQLiteVisitor) QuoteColumnName(literal SqlLiteralNode) string
- func (v SQLiteVisitor) QuoteTableName(visitable Visitable) string
- func (v SQLiteVisitor) Visit(visitable Visitable) string
- type SelectCoreNode
- type SelectManager
- func (mgr *SelectManager) As(name string) *TableAliasNode
- func (mgr *SelectManager) Distinct() *SelectManager
- func (mgr *SelectManager) Except(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *SelectManager) Exists() *ExistsNode
- func (mgr *SelectManager) From(table interface{}) *SelectManager
- func (mgr *SelectManager) Group(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) GroupBy(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) Having(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) InnerJoin(visitable Visitable) *SelectManager
- func (mgr *SelectManager) Intersect(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *SelectManager) Join(visitable Visitable) *SelectManager
- func (mgr *SelectManager) Limit(i int) *SelectManager
- func (mgr *SelectManager) Lock(node SqlLiteralNode) *SelectManager
- func (mgr *SelectManager) LockForUpdate() *SelectManager
- func (mgr *SelectManager) NotDistinct() *SelectManager
- func (mgr *SelectManager) Offset(i int) *SelectManager
- func (mgr *SelectManager) On(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) Order(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) OuterJoin(visitable Visitable) *SelectManager
- func (mgr *SelectManager) Project(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) Select(visitables ...Visitable) *SelectManager
- func (mgr *SelectManager) Skip(i int) *SelectManager
- func (mgr *SelectManager) Take(i int) *SelectManager
- func (mgr *SelectManager) ToSql() string
- func (mgr *SelectManager) Union(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *SelectManager) UnionAll(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
- func (mgr *SelectManager) Using(str string) *SelectManager
- func (mgr *SelectManager) Where(visitable Visitable) *SelectManager
- func (mgr *SelectManager) Window(node SqlLiteralNode) *NamedWindowNode
- func (mgr *SelectManager) With(visitable Visitable) *SelectManager
- func (mgr *SelectManager) WithRecursive(visitable Visitable) *SelectManager
- type SelectStatementNode
- type SqlLiteralNode
- func (node SqlLiteralNode) As(literal SqlLiteralNode) *AsNode
- func (node SqlLiteralNode) Asc() *AscendingNode
- func (node SqlLiteralNode) Count() *CountNode
- func (node SqlLiteralNode) Desc() *DescendingNode
- func (node SqlLiteralNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
- func (node SqlLiteralNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
- func (node SqlLiteralNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
- func (node SqlLiteralNode) Eq(visitable Visitable) *EqualityNode
- func (node SqlLiteralNode) EqAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) EqAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) Extract(literal SqlLiteralNode) *ExtractNode
- func (node SqlLiteralNode) Gt(visitable Visitable) *GreaterThanNode
- func (node SqlLiteralNode) GtAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) GtAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
- func (node SqlLiteralNode) GtEqAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) GtEqAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) In(visitables []Visitable) Visitable
- func (node SqlLiteralNode) InAll(visitableslices ...[]Visitable) Visitable
- func (node SqlLiteralNode) InAny(visitableslices ...[]Visitable) Visitable
- func (node SqlLiteralNode) Lt(visitable Visitable) *LessThanNode
- func (node SqlLiteralNode) LtAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) LtAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) LtEq(visitable Visitable) *LessThanOrEqualNode
- func (node SqlLiteralNode) LtEqAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) LtEqAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) Matches(literal SqlLiteralNode) *MatchesNode
- func (node SqlLiteralNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
- func (node SqlLiteralNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
- func (node SqlLiteralNode) NotEq(visitable Visitable) *NotEqualNode
- func (node SqlLiteralNode) NotEqAll(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) NotEqAny(visitables ...Visitable) *GroupingNode
- func (node SqlLiteralNode) NotIn(visitables []Visitable) Visitable
- func (node SqlLiteralNode) NotInAll(visitableslices ...[]Visitable) Visitable
- func (node SqlLiteralNode) NotInAny(visitableslices ...[]Visitable) Visitable
- func (node SqlLiteralNode) String() string
- type SumNode
- type Table
- func (t *Table) Alias() *TableAliasNode
- func (t *Table) Attr(name string) *AttributeNode
- func (t *Table) From(relation *Table) *SelectManager
- func (t *Table) Group(visitables ...Visitable) *SelectManager
- func (t *Table) Having(visitables ...Visitable) *SelectManager
- func (t *Table) InnerJoin(visitable Visitable) *SelectManager
- func (t *Table) InsertManager() *InsertManager
- func (t *Table) Join(visitable Visitable) *SelectManager
- func (t *Table) Offset(i int) *SelectManager
- func (t *Table) Order(visitables ...Visitable) *SelectManager
- func (t *Table) OuterJoin(visitable Visitable) *SelectManager
- func (t *Table) Project(visitables ...Visitable) *SelectManager
- func (t *Table) Select(visitables ...Visitable) *SelectManager
- func (t *Table) SelectManager(relation *Table) *SelectManager
- func (t *Table) SetTableAlias(name string)
- func (t *Table) Skip(i int) *SelectManager
- func (t *Table) String() string
- func (t *Table) Take(i int) *SelectManager
- func (t *Table) Where(visitable Visitable) *SelectManager
- type TableAliasNode
- type ToSqlVisitor
- func (v *ToSqlVisitor) Accept(visitable Visitable) string
- func (v ToSqlVisitor) Quote(thing interface{}) string
- func (v ToSqlVisitor) QuoteColumnName(literal SqlLiteralNode) string
- func (v ToSqlVisitor) QuoteTableName(visitable Visitable) string
- func (v *ToSqlVisitor) Visit(visitable Visitable) string
- type TopNode
- type TreeManager
- type TrueNode
- type UnaryNode
- type UnionAllNode
- type UnionNode
- type UnqualifiedColumnNode
- type UpdateManager
- func (mgr *UpdateManager) From(relation *Table) *UpdateManager
- func (mgr *UpdateManager) Order(expressions ...Visitable) *UpdateManager
- func (mgr *UpdateManager) Set(field *AttributeNode, value Visitable) *UpdateManager
- func (mgr *UpdateManager) SetKey(node *AttributeNode) *UpdateManager
- func (mgr *UpdateManager) Table(relation *Table) *UpdateManager
- func (mgr *UpdateManager) Take(limit int) *UpdateManager
- func (mgr *UpdateManager) ToSql() string
- func (mgr *UpdateManager) Where(visitable Visitable) *UpdateManager
- type UpdateStatementNode
- type UsingNode
- type ValuesNode
- type Visitable
- type Visitor
- type WindowNode
- type Windower
- type WithNode
- type WithRecursiveNode
Constants ¶
View Source
const ( WHERE = " WHERE " SPACE = " " COMMA = ", " GROUP_BY = " GROUP BY " ORDER_BY = " ORDER BY " WINDOW = " WINDOW " AND = " AND " DISTINCT = "DISTINCT" )
Variables ¶
This section is empty.
Functions ¶
func RegisterDatabase ¶
func RegisterDatabase(db string)
func RegisterEngine ¶
func RegisterEngine(engine Engine)
Types ¶
type Aliaser ¶
type Aliaser interface { As(SqlLiteralNode) *AsNode Visitable }
type AndNode ¶
type AndNode struct { Children *[]Visitable BaseVisitable }
type AsNode ¶
type AsNode struct { Left Visitable Right Visitable BaseVisitable }
type AscendingNode ¶
type AscendingNode OrderingNode
func (*AscendingNode) Direction ¶
func (node *AscendingNode) Direction() string
func (AscendingNode) Eq ¶
func (node AscendingNode) Eq(other AscendingNode) bool
func (*AscendingNode) Reverse ¶
func (node *AscendingNode) Reverse() *DescendingNode
type AssignmentNode ¶
type AssignmentNode BinaryNode
type AttributeNode ¶
type AttributeNode struct { Name SqlLiteralNode Relation Visitable BaseVisitable }
func NewAttributeNode ¶
func NewAttributeNode(v Visitable, name string) *AttributeNode
func (*AttributeNode) As ¶
func (node *AttributeNode) As(literal SqlLiteralNode) *AsNode
func (*AttributeNode) Asc ¶
func (node *AttributeNode) Asc() *AscendingNode
func (*AttributeNode) Count ¶
func (node *AttributeNode) Count() *CountNode
func (*AttributeNode) Desc ¶
func (node *AttributeNode) Desc() *DescendingNode
func (*AttributeNode) DoesNotMatch ¶
func (node *AttributeNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (*AttributeNode) DoesNotMatchAll ¶
func (node *AttributeNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (*AttributeNode) DoesNotMatchAny ¶
func (node *AttributeNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (*AttributeNode) Eq ¶
func (node *AttributeNode) Eq(visitable Visitable) *EqualityNode
func (*AttributeNode) EqAll ¶
func (node *AttributeNode) EqAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) EqAny ¶
func (node *AttributeNode) EqAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) Extract ¶
func (node *AttributeNode) Extract(literal SqlLiteralNode) *ExtractNode
func (*AttributeNode) Gt ¶
func (node *AttributeNode) Gt(visitable Visitable) *GreaterThanNode
func (*AttributeNode) GtAll ¶
func (node *AttributeNode) GtAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) GtAny ¶
func (node *AttributeNode) GtAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) GtEq ¶
func (node *AttributeNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (*AttributeNode) GtEqAll ¶
func (node *AttributeNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) GtEqAny ¶
func (node *AttributeNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) In ¶
func (node *AttributeNode) In(visitables []Visitable) Visitable
func (*AttributeNode) InAll ¶
func (node *AttributeNode) InAll(visitableslices ...[]Visitable) Visitable
func (*AttributeNode) InAny ¶
func (node *AttributeNode) InAny(visitableslices ...[]Visitable) Visitable
func (*AttributeNode) Lt ¶
func (node *AttributeNode) Lt(visitable Visitable) *LessThanNode
func (*AttributeNode) LtAll ¶
func (node *AttributeNode) LtAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) LtAny ¶
func (node *AttributeNode) LtAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) LtEq ¶
func (node *AttributeNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (*AttributeNode) LtEqAll ¶
func (node *AttributeNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) LtEqAny ¶
func (node *AttributeNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) Matches ¶
func (node *AttributeNode) Matches(literal SqlLiteralNode) *MatchesNode
func (*AttributeNode) MatchesAll ¶
func (node *AttributeNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (*AttributeNode) MatchesAny ¶
func (node *AttributeNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (*AttributeNode) NotEq ¶
func (node *AttributeNode) NotEq(visitable Visitable) *NotEqualNode
func (*AttributeNode) NotEqAll ¶
func (node *AttributeNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (*AttributeNode) NotEqAny ¶
func (node *AttributeNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (*AttributeNode) NotIn ¶
func (node *AttributeNode) NotIn(visitables []Visitable) Visitable
func (*AttributeNode) NotInAll ¶
func (node *AttributeNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (*AttributeNode) NotInAny ¶
func (node *AttributeNode) NotInAny(visitableslices ...[]Visitable) Visitable
type BaseVisitable ¶
type BaseVisitable struct{}
BaseVisitable satisfies the Visitable Interface All other nodes should have an embedded BaseVisitable
func (BaseVisitable) NewAndNode ¶
func (v BaseVisitable) NewAndNode(n ...Visitable) *AndNode
func (BaseVisitable) NewFalseNode ¶
func (v BaseVisitable) NewFalseNode() *FalseNode
func (BaseVisitable) NewGroupingNode ¶
func (v BaseVisitable) NewGroupingNode() *GroupingNode
func (BaseVisitable) NewInnerJoinNode ¶
func (v BaseVisitable) NewInnerJoinNode() *InnerJoinNode
func (BaseVisitable) NewNamedFunctionNode ¶
func (v BaseVisitable) NewNamedFunctionNode() *NamedFunctionNode
func (BaseVisitable) NewNotNode ¶
func (v BaseVisitable) NewNotNode() *NotNode
func (BaseVisitable) NewOnNode ¶
func (v BaseVisitable) NewOnNode(visitable Visitable) *OnNode
func (BaseVisitable) NewOuterJoinNode ¶
func (v BaseVisitable) NewOuterJoinNode() *OuterJoinNode
func (BaseVisitable) NewTableAliasNode ¶
func (v BaseVisitable) NewTableAliasNode(t *Table, name string) *TableAliasNode
func (BaseVisitable) NewTrueNode ¶
func (v BaseVisitable) NewTrueNode() *TrueNode
func (BaseVisitable) String ¶
func (v BaseVisitable) String() string
type BetweenNode ¶
type BetweenNode BinaryNode
type BinaryNode ¶
type BinaryNode struct { Left Visitable Right Visitable BaseVisitable }
func NewBinaryNode ¶
func NewBinaryNode(left Visitable, right Visitable) BinaryNode
type BindParamNode ¶
type BindParamNode struct { Raw string BaseVisitable }
func NewBindParamNode ¶
func NewBindParamNode(raw string) *BindParamNode
func (*BindParamNode) String ¶
func (node *BindParamNode) String() string
type CountNode ¶
type CountNode FunctionNode
func (*CountNode) As ¶
func (node *CountNode) As(literal SqlLiteralNode) *AsNode
func (*CountNode) Asc ¶
func (node *CountNode) Asc() *AscendingNode
func (*CountNode) Desc ¶
func (node *CountNode) Desc() *DescendingNode
type CurrentRowNode ¶
type CurrentRowNode UnaryNode
type DefaultConnector ¶
type DefaultConnector struct{}
func (DefaultConnector) Quote ¶
func (c DefaultConnector) Quote(thing interface{}) string
func (DefaultConnector) QuoteColumnName ¶
func (c DefaultConnector) QuoteColumnName(name string) string
func (DefaultConnector) QuoteTableName ¶
func (c DefaultConnector) QuoteTableName(name string) string
type DefaultEngine ¶
type DefaultEngine struct {
// contains filtered or unexported fields
}
func (DefaultEngine) Visitor ¶
func (e DefaultEngine) Visitor() Visitor
type DeleteManager ¶
type DeleteManager struct { Engine Engine Ast *DeleteStatementNode BaseVisitable }
func Delete ¶
func Delete() *DeleteManager
func NewDeleteManager ¶
func NewDeleteManager(engine Engine) *DeleteManager
func (*DeleteManager) From ¶
func (mgr *DeleteManager) From(table interface{}) *DeleteManager
func (*DeleteManager) FromTable ¶
func (mgr *DeleteManager) FromTable(table *Table) *DeleteManager
func (*DeleteManager) ToSql ¶
func (mgr *DeleteManager) ToSql() string
func (*DeleteManager) Where ¶
func (mgr *DeleteManager) Where(visitable Visitable) *DeleteManager
type DeleteStatementNode ¶
type DeleteStatementNode struct { Relation *Table Wheres *[]Visitable BaseVisitable }
func NewDeleteStatementNode ¶
func NewDeleteStatementNode() *DeleteStatementNode
func (DeleteStatementNode) Eq ¶
func (node DeleteStatementNode) Eq(other DeleteStatementNode) bool
type DescendingNode ¶
type DescendingNode OrderingNode
func (*DescendingNode) Direction ¶
func (node *DescendingNode) Direction() string
func (DescendingNode) Eq ¶
func (node DescendingNode) Eq(other DescendingNode) bool
func (*DescendingNode) Reverse ¶
func (node *DescendingNode) Reverse() *AscendingNode
type DistinctNode ¶
type DistinctNode struct {
BaseVisitable
}
type DistinctOnNode ¶
type DistinctOnNode UnaryNode
func NewDistinctOnNode ¶
func NewDistinctOnNode(visitable Visitable) *DistinctOnNode
type DoesNotMatchNode ¶
type DoesNotMatchNode BinaryNode
type Engine ¶
type Engine interface {
Visitor() Visitor
}
var RelEngine Engine = &DefaultEngine{ visitor: &ToSqlVisitor{Conn: DefaultConnector{}}, }
type EqualityNode ¶
type EqualityNode struct { Left Visitable Right Visitable BaseVisitable }
func NewEqualityNode ¶
func NewEqualityNode(left Visitable, right Visitable) EqualityNode
func (EqualityNode) And ¶
func (node EqualityNode) And(other Visitable) *GroupingNode
func (EqualityNode) Or ¶
func (node EqualityNode) Or(other Visitable) *GroupingNode
type ExceptNode ¶
type ExceptNode BinaryNode
type ExistsNode ¶
type ExistsNode FunctionNode
func NewExistsNode ¶
func NewExistsNode(v Visitable) *ExistsNode
func (ExistsNode) As ¶
func (node ExistsNode) As(literal SqlLiteralNode) *AsNode
func (ExistsNode) Asc ¶
func (node ExistsNode) Asc() *AscendingNode
func (ExistsNode) Count ¶
func (node ExistsNode) Count() *CountNode
func (ExistsNode) Desc ¶
func (node ExistsNode) Desc() *DescendingNode
func (ExistsNode) DoesNotMatch ¶
func (node ExistsNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (ExistsNode) DoesNotMatchAll ¶
func (node ExistsNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (ExistsNode) DoesNotMatchAny ¶
func (node ExistsNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (ExistsNode) Eq ¶
func (node ExistsNode) Eq(visitable Visitable) *EqualityNode
func (ExistsNode) EqAll ¶
func (node ExistsNode) EqAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) EqAny ¶
func (node ExistsNode) EqAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) Extract ¶
func (node ExistsNode) Extract(literal SqlLiteralNode) *ExtractNode
func (ExistsNode) Gt ¶
func (node ExistsNode) Gt(visitable Visitable) *GreaterThanNode
func (ExistsNode) GtAll ¶
func (node ExistsNode) GtAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) GtAny ¶
func (node ExistsNode) GtAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) GtEq ¶
func (node ExistsNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (ExistsNode) GtEqAll ¶
func (node ExistsNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) GtEqAny ¶
func (node ExistsNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) In ¶
func (node ExistsNode) In(visitables []Visitable) Visitable
func (ExistsNode) InAll ¶
func (node ExistsNode) InAll(visitableslices ...[]Visitable) Visitable
func (ExistsNode) InAny ¶
func (node ExistsNode) InAny(visitableslices ...[]Visitable) Visitable
func (ExistsNode) Lt ¶
func (node ExistsNode) Lt(visitable Visitable) *LessThanNode
func (ExistsNode) LtAll ¶
func (node ExistsNode) LtAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) LtAny ¶
func (node ExistsNode) LtAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) LtEq ¶
func (node ExistsNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (ExistsNode) LtEqAll ¶
func (node ExistsNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) LtEqAny ¶
func (node ExistsNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) Matches ¶
func (node ExistsNode) Matches(literal SqlLiteralNode) *MatchesNode
func (ExistsNode) MatchesAll ¶
func (node ExistsNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (ExistsNode) MatchesAny ¶
func (node ExistsNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (ExistsNode) NotEq ¶
func (node ExistsNode) NotEq(visitable Visitable) *NotEqualNode
func (ExistsNode) NotEqAll ¶
func (node ExistsNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (ExistsNode) NotEqAny ¶
func (node ExistsNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (ExistsNode) NotIn ¶
func (node ExistsNode) NotIn(visitables []Visitable) Visitable
func (ExistsNode) NotInAll ¶
func (node ExistsNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (ExistsNode) NotInAny ¶
func (node ExistsNode) NotInAny(visitableslices ...[]Visitable) Visitable
type ExtractNode ¶
type ExtractNode struct { Expressions []Visitable Field *SqlLiteralNode Alias *SqlLiteralNode BaseVisitable }
func (*ExtractNode) As ¶
func (node *ExtractNode) As(n SqlLiteralNode) *ExtractNode
func (*ExtractNode) Asc ¶
func (node *ExtractNode) Asc() *AscendingNode
func (*ExtractNode) Count ¶
func (node *ExtractNode) Count() *CountNode
func (*ExtractNode) Desc ¶
func (node *ExtractNode) Desc() *DescendingNode
func (*ExtractNode) DoesNotMatch ¶
func (node *ExtractNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (*ExtractNode) DoesNotMatchAll ¶
func (node *ExtractNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (*ExtractNode) DoesNotMatchAny ¶
func (node *ExtractNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (*ExtractNode) Eq ¶
func (node *ExtractNode) Eq(visitable Visitable) *EqualityNode
func (*ExtractNode) EqAll ¶
func (node *ExtractNode) EqAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) EqAny ¶
func (node *ExtractNode) EqAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) Extract ¶
func (node *ExtractNode) Extract(literal SqlLiteralNode) *ExtractNode
func (*ExtractNode) Gt ¶
func (node *ExtractNode) Gt(visitable Visitable) *GreaterThanNode
func (*ExtractNode) GtAll ¶
func (node *ExtractNode) GtAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) GtAny ¶
func (node *ExtractNode) GtAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) GtEq ¶
func (node *ExtractNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (*ExtractNode) GtEqAll ¶
func (node *ExtractNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) GtEqAny ¶
func (node *ExtractNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) In ¶
func (node *ExtractNode) In(visitables []Visitable) Visitable
func (*ExtractNode) InAll ¶
func (node *ExtractNode) InAll(visitableslices ...[]Visitable) Visitable
func (*ExtractNode) InAny ¶
func (node *ExtractNode) InAny(visitableslices ...[]Visitable) Visitable
func (*ExtractNode) Lt ¶
func (node *ExtractNode) Lt(visitable Visitable) *LessThanNode
func (*ExtractNode) LtAll ¶
func (node *ExtractNode) LtAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) LtAny ¶
func (node *ExtractNode) LtAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) LtEq ¶
func (node *ExtractNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (*ExtractNode) LtEqAll ¶
func (node *ExtractNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) LtEqAny ¶
func (node *ExtractNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) Matches ¶
func (node *ExtractNode) Matches(literal SqlLiteralNode) *MatchesNode
func (*ExtractNode) MatchesAll ¶
func (node *ExtractNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (*ExtractNode) MatchesAny ¶
func (node *ExtractNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (*ExtractNode) NotEq ¶
func (node *ExtractNode) NotEq(visitable Visitable) *NotEqualNode
func (*ExtractNode) NotEqAll ¶
func (node *ExtractNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (*ExtractNode) NotEqAny ¶
func (node *ExtractNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (*ExtractNode) NotIn ¶
func (node *ExtractNode) NotIn(visitables []Visitable) Visitable
func (*ExtractNode) NotInAll ¶
func (node *ExtractNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (*ExtractNode) NotInAny ¶
func (node *ExtractNode) NotInAny(visitableslices ...[]Visitable) Visitable
type FalseNode ¶
type FalseNode struct {
BaseVisitable
}
type FollowingNode ¶
type FollowingNode UnaryNode
type FunctionNode ¶
type FunctionNode struct { Expressions []Visitable Alias *SqlLiteralNode Distinct bool BaseVisitable }
func (*FunctionNode) Count ¶
func (node *FunctionNode) Count() *CountNode
func (*FunctionNode) DoesNotMatch ¶
func (node *FunctionNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (*FunctionNode) DoesNotMatchAll ¶
func (node *FunctionNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (*FunctionNode) DoesNotMatchAny ¶
func (node *FunctionNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (*FunctionNode) Eq ¶
func (node *FunctionNode) Eq(visitable Visitable) *EqualityNode
func (*FunctionNode) EqAll ¶
func (node *FunctionNode) EqAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) EqAny ¶
func (node *FunctionNode) EqAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) Extract ¶
func (node *FunctionNode) Extract(literal SqlLiteralNode) *ExtractNode
func (*FunctionNode) Gt ¶
func (node *FunctionNode) Gt(visitable Visitable) *GreaterThanNode
func (*FunctionNode) GtAll ¶
func (node *FunctionNode) GtAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) GtAny ¶
func (node *FunctionNode) GtAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) GtEq ¶
func (node *FunctionNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (*FunctionNode) GtEqAll ¶
func (node *FunctionNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) GtEqAny ¶
func (node *FunctionNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) In ¶
func (node *FunctionNode) In(visitables []Visitable) Visitable
func (*FunctionNode) InAll ¶
func (node *FunctionNode) InAll(visitableslices ...[]Visitable) Visitable
func (*FunctionNode) InAny ¶
func (node *FunctionNode) InAny(visitableslices ...[]Visitable) Visitable
func (*FunctionNode) Lt ¶
func (node *FunctionNode) Lt(visitable Visitable) *LessThanNode
func (*FunctionNode) LtAll ¶
func (node *FunctionNode) LtAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) LtAny ¶
func (node *FunctionNode) LtAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) LtEq ¶
func (node *FunctionNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (*FunctionNode) LtEqAll ¶
func (node *FunctionNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) LtEqAny ¶
func (node *FunctionNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) Matches ¶
func (node *FunctionNode) Matches(literal SqlLiteralNode) *MatchesNode
func (*FunctionNode) MatchesAll ¶
func (node *FunctionNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (*FunctionNode) MatchesAny ¶
func (node *FunctionNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (*FunctionNode) NotEq ¶
func (node *FunctionNode) NotEq(visitable Visitable) *NotEqualNode
func (*FunctionNode) NotEqAll ¶
func (node *FunctionNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (*FunctionNode) NotEqAny ¶
func (node *FunctionNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (*FunctionNode) NotIn ¶
func (node *FunctionNode) NotIn(visitables []Visitable) Visitable
func (*FunctionNode) NotInAll ¶
func (node *FunctionNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (*FunctionNode) NotInAny ¶
func (node *FunctionNode) NotInAny(visitableslices ...[]Visitable) Visitable
func (*FunctionNode) Over ¶
func (node *FunctionNode) Over(visitable Visitable) *OverNode
type GreaterThanNode ¶
type GreaterThanNode BinaryNode
type GreaterThanOrEqualNode ¶
type GreaterThanOrEqualNode BinaryNode
type GroupingNode ¶
type GroupingNode struct { Expr []Visitable BaseVisitable }
func (GroupingNode) As ¶
func (node GroupingNode) As(literal SqlLiteralNode) *AsNode
func (GroupingNode) Asc ¶
func (node GroupingNode) Asc() *AscendingNode
func (GroupingNode) Count ¶
func (node GroupingNode) Count() *CountNode
func (GroupingNode) Desc ¶
func (node GroupingNode) Desc() *DescendingNode
func (GroupingNode) DoesNotMatch ¶
func (node GroupingNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (GroupingNode) DoesNotMatchAll ¶
func (node GroupingNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (GroupingNode) DoesNotMatchAny ¶
func (node GroupingNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (GroupingNode) Eq ¶
func (node GroupingNode) Eq(visitable Visitable) *EqualityNode
func (GroupingNode) EqAll ¶
func (node GroupingNode) EqAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) EqAny ¶
func (node GroupingNode) EqAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) Extract ¶
func (node GroupingNode) Extract(literal SqlLiteralNode) *ExtractNode
func (GroupingNode) Gt ¶
func (node GroupingNode) Gt(visitable Visitable) *GreaterThanNode
func (GroupingNode) GtAll ¶
func (node GroupingNode) GtAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) GtAny ¶
func (node GroupingNode) GtAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) GtEq ¶
func (node GroupingNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (GroupingNode) GtEqAll ¶
func (node GroupingNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) GtEqAny ¶
func (node GroupingNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) In ¶
func (node GroupingNode) In(visitables []Visitable) Visitable
func (GroupingNode) InAll ¶
func (node GroupingNode) InAll(visitableslices ...[]Visitable) Visitable
func (GroupingNode) InAny ¶
func (node GroupingNode) InAny(visitableslices ...[]Visitable) Visitable
func (GroupingNode) Lt ¶
func (node GroupingNode) Lt(visitable Visitable) *LessThanNode
func (GroupingNode) LtAll ¶
func (node GroupingNode) LtAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) LtAny ¶
func (node GroupingNode) LtAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) LtEq ¶
func (node GroupingNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (GroupingNode) LtEqAll ¶
func (node GroupingNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) LtEqAny ¶
func (node GroupingNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) Matches ¶
func (node GroupingNode) Matches(literal SqlLiteralNode) *MatchesNode
func (GroupingNode) MatchesAll ¶
func (node GroupingNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (GroupingNode) MatchesAny ¶
func (node GroupingNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (GroupingNode) NotEq ¶
func (node GroupingNode) NotEq(visitable Visitable) *NotEqualNode
func (GroupingNode) NotEqAll ¶
func (node GroupingNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (GroupingNode) NotEqAny ¶
func (node GroupingNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (GroupingNode) NotIn ¶
func (node GroupingNode) NotIn(visitables []Visitable) Visitable
func (GroupingNode) NotInAll ¶
func (node GroupingNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (GroupingNode) NotInAny ¶
func (node GroupingNode) NotInAny(visitableslices ...[]Visitable) Visitable
type HavingNode ¶
type HavingNode UnaryNode
func NewHavingNode ¶
func NewHavingNode(visitable Visitable) *HavingNode
type InNode ¶
type InNode struct { Left Visitable Right []Visitable BaseVisitable }
type InfixOperationNode ¶
type InfixOperationNode struct { Operator SqlLiteralNode Left Visitable Right Visitable BaseVisitable }
func (InfixOperationNode) As ¶
func (node InfixOperationNode) As(literal SqlLiteralNode) *AsNode
func (InfixOperationNode) Asc ¶
func (node InfixOperationNode) Asc() *AscendingNode
func (InfixOperationNode) Count ¶
func (node InfixOperationNode) Count() *CountNode
func (InfixOperationNode) Desc ¶
func (node InfixOperationNode) Desc() *DescendingNode
func (InfixOperationNode) DoesNotMatch ¶
func (node InfixOperationNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (InfixOperationNode) DoesNotMatchAll ¶
func (node InfixOperationNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (InfixOperationNode) DoesNotMatchAny ¶
func (node InfixOperationNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (InfixOperationNode) Eq ¶
func (node InfixOperationNode) Eq(visitable Visitable) *EqualityNode
func (InfixOperationNode) EqAll ¶
func (node InfixOperationNode) EqAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) EqAny ¶
func (node InfixOperationNode) EqAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) Extract ¶
func (node InfixOperationNode) Extract(literal SqlLiteralNode) *ExtractNode
func (InfixOperationNode) Gt ¶
func (node InfixOperationNode) Gt(visitable Visitable) *GreaterThanNode
func (InfixOperationNode) GtAll ¶
func (node InfixOperationNode) GtAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) GtAny ¶
func (node InfixOperationNode) GtAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) GtEq ¶
func (node InfixOperationNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (InfixOperationNode) GtEqAll ¶
func (node InfixOperationNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) GtEqAny ¶
func (node InfixOperationNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) In ¶
func (node InfixOperationNode) In(visitables []Visitable) Visitable
func (InfixOperationNode) InAll ¶
func (node InfixOperationNode) InAll(visitableslices ...[]Visitable) Visitable
func (InfixOperationNode) InAny ¶
func (node InfixOperationNode) InAny(visitableslices ...[]Visitable) Visitable
func (InfixOperationNode) Lt ¶
func (node InfixOperationNode) Lt(visitable Visitable) *LessThanNode
func (InfixOperationNode) LtAll ¶
func (node InfixOperationNode) LtAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) LtAny ¶
func (node InfixOperationNode) LtAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) LtEq ¶
func (node InfixOperationNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (InfixOperationNode) LtEqAll ¶
func (node InfixOperationNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) LtEqAny ¶
func (node InfixOperationNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) Matches ¶
func (node InfixOperationNode) Matches(literal SqlLiteralNode) *MatchesNode
func (InfixOperationNode) MatchesAll ¶
func (node InfixOperationNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (InfixOperationNode) MatchesAny ¶
func (node InfixOperationNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (InfixOperationNode) NotEq ¶
func (node InfixOperationNode) NotEq(visitable Visitable) *NotEqualNode
func (InfixOperationNode) NotEqAll ¶
func (node InfixOperationNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) NotEqAny ¶
func (node InfixOperationNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (InfixOperationNode) NotIn ¶
func (node InfixOperationNode) NotIn(visitables []Visitable) Visitable
func (InfixOperationNode) NotInAll ¶
func (node InfixOperationNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (InfixOperationNode) NotInAny ¶
func (node InfixOperationNode) NotInAny(visitableslices ...[]Visitable) Visitable
type InnerJoinNode ¶
type InnerJoinNode JoinNode
type InsertManager ¶
type InsertManager struct { Engine Engine Ast *InsertStatementNode BaseVisitable }
func Insert ¶
func Insert() *InsertManager
func NewInsertManager ¶
func NewInsertManager(engine Engine) *InsertManager
func (*InsertManager) CreateValues ¶
func (mgr *InsertManager) CreateValues(values []interface{}, columns []*AttributeNode) *ValuesNode
func (*InsertManager) Insert ¶
func (mgr *InsertManager) Insert(column *AttributeNode, value interface{}) *InsertManager
func (*InsertManager) Into ¶
func (mgr *InsertManager) Into(table *Table) *InsertManager
func (*InsertManager) SetValues ¶
func (mgr *InsertManager) SetValues(values *ValuesNode)
func (*InsertManager) ToSql ¶
func (mgr *InsertManager) ToSql() string
func (*InsertManager) Values ¶
func (mgr *InsertManager) Values(column *AttributeNode, value interface{}) *InsertManager
type InsertStatementNode ¶
type InsertStatementNode struct { Relation *Table Columns *[]*AttributeNode Values *ValuesNode BaseVisitable }
func (*InsertStatementNode) Eq ¶
func (mgr *InsertStatementNode) Eq(other *InsertStatementNode) bool
type IntersectNode ¶
type IntersectNode BinaryNode
type JoinNode ¶
type JoinNode BinaryNode
type JoinSource ¶
type JoinSource struct { Left Visitable Right []Visitable BaseVisitable }
type LessThanNode ¶
type LessThanNode BinaryNode
type LessThanOrEqualNode ¶
type LessThanOrEqualNode BinaryNode
type MatchesNode ¶
type MatchesNode BinaryNode
type MultiStatementManager ¶
type MultiStatementManager struct { Engine Engine Ast Visitable BaseVisitable }
A TreeManager allowing for EXCEPT, INTERSECT, UNION and UNION ALL statements
func NewMultiStatementManager ¶
func NewMultiStatementManager(e Engine) *MultiStatementManager
func (*MultiStatementManager) Except ¶
func (mgr *MultiStatementManager) Except(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*MultiStatementManager) Intersect ¶
func (mgr *MultiStatementManager) Intersect(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*MultiStatementManager) ToSql ¶
func (mgr *MultiStatementManager) ToSql() string
func (*MultiStatementManager) Union ¶
func (mgr *MultiStatementManager) Union(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*MultiStatementManager) UnionAll ¶
func (mgr *MultiStatementManager) UnionAll(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
type MysqlVisitor ¶
type MysqlVisitor struct {
Conn Connector
}
func (MysqlVisitor) Accept ¶
func (v MysqlVisitor) Accept(visitable Visitable) string
func (MysqlVisitor) Quote ¶
func (v MysqlVisitor) Quote(thing interface{}) string
func (MysqlVisitor) QuoteColumnName ¶
func (v MysqlVisitor) QuoteColumnName(literal SqlLiteralNode) string
func (MysqlVisitor) QuoteTableName ¶
func (v MysqlVisitor) QuoteTableName(visitable Visitable) string
func (MysqlVisitor) Visit ¶
func (v MysqlVisitor) Visit(visitable Visitable) string
type NamedFunctionNode ¶
type NamedFunctionNode struct { Name *SqlLiteralNode FunctionNode }
type NamedWindowNode ¶
type NamedWindowNode struct { Name SqlLiteralNode Orders *[]Visitable Framing Visitable BaseVisitable }
func (*NamedWindowNode) Frame ¶
func (node *NamedWindowNode) Frame(v Visitable) Visitable
func (*NamedWindowNode) Order ¶
func (node *NamedWindowNode) Order(v Visitable) *NamedWindowNode
func (*NamedWindowNode) Range ¶
func (node *NamedWindowNode) Range(v Visitable) Visitable
func (*NamedWindowNode) Rows ¶
func (node *NamedWindowNode) Rows(v Visitable) Visitable
type NotEqualNode ¶
type NotEqualNode BinaryNode
type NotInNode ¶
type NotInNode struct { Left Visitable Right []Visitable BaseVisitable }
type OffsetNode ¶
type OffsetNode UnaryNode
func NewOffsetNode ¶
func NewOffsetNode(visitable Visitable) *OffsetNode
type OrNode ¶
type OrNode BinaryNode
type Orderer ¶
type Orderer interface { Desc() *DescendingNode Asc() *AscendingNode Visitable }
type OrderingNode ¶
type OrderingNode UnaryNode
func NewOrderingNode ¶
func NewOrderingNode(visitable Visitable) *OrderingNode
type OuterJoinNode ¶
type OuterJoinNode JoinNode
type OverNode ¶
type OverNode BinaryNode
func (*OverNode) As ¶
func (node *OverNode) As(literal SqlLiteralNode) *AsNode
type PostgreSQLVisitor ¶
type PostgreSQLVisitor struct {
Conn Connector
}
Used to handle generating Postgres specific sql
func (*PostgreSQLVisitor) Accept ¶
func (v *PostgreSQLVisitor) Accept(visitable Visitable) string
func (PostgreSQLVisitor) Quote ¶
func (v PostgreSQLVisitor) Quote(thing interface{}) string
func (PostgreSQLVisitor) QuoteColumnName ¶
func (v PostgreSQLVisitor) QuoteColumnName(literal SqlLiteralNode) string
func (PostgreSQLVisitor) QuoteTableName ¶
func (v PostgreSQLVisitor) QuoteTableName(visitable Visitable) string
func (*PostgreSQLVisitor) Visit ¶
func (v *PostgreSQLVisitor) Visit(visitable Visitable) string
type PrecedingNode ¶
type PrecedingNode UnaryNode
type Predicator ¶
type Predicator interface { Eq(Visitable) *EqualityNode EqAny(...Visitable) *GroupingNode EqAll(...Visitable) *GroupingNode Lt(Visitable) *LessThanNode LtEq(Visitable) *LessThanOrEqualNode LtAny(...Visitable) *GroupingNode LtAll(...Visitable) *GroupingNode Gt(Visitable) *GreaterThanNode GtEq(Visitable) *GreaterThanOrEqualNode GtAny(...Visitable) *GroupingNode GtAll(...Visitable) *GroupingNode In([]Visitable) Visitable NotIn([]Visitable) Visitable NotEq(Visitable) *NotEqualNode Matches(SqlLiteralNode) *MatchesNode DoesNotMatch(SqlLiteralNode) *DoesNotMatchNode Visitable }
type QuotedNode ¶
type QuotedNode struct { Raw string BaseVisitable }
Handles specific cases where sql must be single quoted As is the case with matching statements such as LIKE and NOT LIKE as well as ILIKE and NOT ILIKE in PostgreSQL
type SQLiteVisitor ¶
type SQLiteVisitor struct {
Conn Connector
}
Used to handle generating Postgres specific sql
func (SQLiteVisitor) Accept ¶
func (v SQLiteVisitor) Accept(visitable Visitable) string
func (SQLiteVisitor) Quote ¶
func (v SQLiteVisitor) Quote(thing interface{}) string
func (SQLiteVisitor) QuoteColumnName ¶
func (v SQLiteVisitor) QuoteColumnName(literal SqlLiteralNode) string
func (SQLiteVisitor) QuoteTableName ¶
func (v SQLiteVisitor) QuoteTableName(visitable Visitable) string
func (SQLiteVisitor) Visit ¶
func (v SQLiteVisitor) Visit(visitable Visitable) string
type SelectCoreNode ¶
type SelectCoreNode struct { Source *JoinSource Top *TopNode Selections *[]Visitable SetQuantifier Visitable Wheres *[]Visitable Groups *[]Visitable Having *HavingNode Windows *[]Visitable BaseVisitable }
func NewSelectCoreNode ¶
func NewSelectCoreNode() *SelectCoreNode
func (*SelectCoreNode) SetFrom ¶
func (node *SelectCoreNode) SetFrom(v Visitable)
type SelectManager ¶
type SelectManager struct { Engine Engine Ast *SelectStatementNode Ctx *SelectCoreNode BaseVisitable }
func NewSelectManager ¶
func NewSelectManager(engine Engine, table *Table) *SelectManager
func Select ¶
func Select(visitables ...Visitable) *SelectManager
func (*SelectManager) As ¶
func (mgr *SelectManager) As(name string) *TableAliasNode
func (*SelectManager) Distinct ¶
func (mgr *SelectManager) Distinct() *SelectManager
func (*SelectManager) Except ¶
func (mgr *SelectManager) Except(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*SelectManager) Exists ¶
func (mgr *SelectManager) Exists() *ExistsNode
func (*SelectManager) From ¶
func (mgr *SelectManager) From(table interface{}) *SelectManager
func (*SelectManager) Group ¶
func (mgr *SelectManager) Group(visitables ...Visitable) *SelectManager
func (*SelectManager) GroupBy ¶
func (mgr *SelectManager) GroupBy(visitables ...Visitable) *SelectManager
func (*SelectManager) Having ¶
func (mgr *SelectManager) Having(visitables ...Visitable) *SelectManager
func (*SelectManager) InnerJoin ¶
func (mgr *SelectManager) InnerJoin(visitable Visitable) *SelectManager
func (*SelectManager) Intersect ¶
func (mgr *SelectManager) Intersect(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*SelectManager) Join ¶
func (mgr *SelectManager) Join(visitable Visitable) *SelectManager
func (*SelectManager) Limit ¶
func (mgr *SelectManager) Limit(i int) *SelectManager
func (*SelectManager) Lock ¶
func (mgr *SelectManager) Lock(node SqlLiteralNode) *SelectManager
func (*SelectManager) LockForUpdate ¶
func (mgr *SelectManager) LockForUpdate() *SelectManager
func (*SelectManager) NotDistinct ¶
func (mgr *SelectManager) NotDistinct() *SelectManager
func (*SelectManager) Offset ¶
func (mgr *SelectManager) Offset(i int) *SelectManager
func (*SelectManager) On ¶
func (mgr *SelectManager) On(visitables ...Visitable) *SelectManager
func (*SelectManager) Order ¶
func (mgr *SelectManager) Order(visitables ...Visitable) *SelectManager
func (*SelectManager) OuterJoin ¶
func (mgr *SelectManager) OuterJoin(visitable Visitable) *SelectManager
func (*SelectManager) Project ¶
func (mgr *SelectManager) Project(visitables ...Visitable) *SelectManager
func (*SelectManager) Select ¶
func (mgr *SelectManager) Select(visitables ...Visitable) *SelectManager
func (*SelectManager) Skip ¶
func (mgr *SelectManager) Skip(i int) *SelectManager
func (*SelectManager) Take ¶
func (mgr *SelectManager) Take(i int) *SelectManager
func (*SelectManager) ToSql ¶
func (mgr *SelectManager) ToSql() string
func (*SelectManager) Union ¶
func (mgr *SelectManager) Union(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*SelectManager) UnionAll ¶
func (mgr *SelectManager) UnionAll(stmt1 Visitable, stmt2 Visitable) *MultiStatementManager
func (*SelectManager) Using ¶
func (mgr *SelectManager) Using(str string) *SelectManager
func (*SelectManager) Where ¶
func (mgr *SelectManager) Where(visitable Visitable) *SelectManager
func (*SelectManager) Window ¶
func (mgr *SelectManager) Window(node SqlLiteralNode) *NamedWindowNode
func (*SelectManager) With ¶
func (mgr *SelectManager) With(visitable Visitable) *SelectManager
func (*SelectManager) WithRecursive ¶
func (mgr *SelectManager) WithRecursive(visitable Visitable) *SelectManager
type SelectStatementNode ¶
type SelectStatementNode struct { Cores []*SelectCoreNode Limit *LimitNode Orders *[]Visitable Lock *LockNode With Visitable // WithNode or WithRecursiveNode Offset *OffsetNode Visitable }
func NewSelectStatementNode ¶
func NewSelectStatementNode() *SelectStatementNode
func (*SelectStatementNode) IsEqual ¶
func (s *SelectStatementNode) IsEqual(s2 SelectStatementNode) bool
type SqlLiteralNode ¶
type SqlLiteralNode struct { Raw string BaseVisitable }
func Sql ¶
func Sql(thing interface{}) SqlLiteralNode
func Star ¶
func Star() SqlLiteralNode
func (SqlLiteralNode) As ¶
func (node SqlLiteralNode) As(literal SqlLiteralNode) *AsNode
func (SqlLiteralNode) Asc ¶
func (node SqlLiteralNode) Asc() *AscendingNode
func (SqlLiteralNode) Count ¶
func (node SqlLiteralNode) Count() *CountNode
func (SqlLiteralNode) Desc ¶
func (node SqlLiteralNode) Desc() *DescendingNode
func (SqlLiteralNode) DoesNotMatch ¶
func (node SqlLiteralNode) DoesNotMatch(literal SqlLiteralNode) *DoesNotMatchNode
func (SqlLiteralNode) DoesNotMatchAll ¶
func (node SqlLiteralNode) DoesNotMatchAll(literals ...SqlLiteralNode) *GroupingNode
func (SqlLiteralNode) DoesNotMatchAny ¶
func (node SqlLiteralNode) DoesNotMatchAny(literals ...SqlLiteralNode) *GroupingNode
func (SqlLiteralNode) Eq ¶
func (node SqlLiteralNode) Eq(visitable Visitable) *EqualityNode
func (SqlLiteralNode) EqAll ¶
func (node SqlLiteralNode) EqAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) EqAny ¶
func (node SqlLiteralNode) EqAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) Extract ¶
func (node SqlLiteralNode) Extract(literal SqlLiteralNode) *ExtractNode
func (SqlLiteralNode) Gt ¶
func (node SqlLiteralNode) Gt(visitable Visitable) *GreaterThanNode
func (SqlLiteralNode) GtAll ¶
func (node SqlLiteralNode) GtAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) GtAny ¶
func (node SqlLiteralNode) GtAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) GtEq ¶
func (node SqlLiteralNode) GtEq(visitable Visitable) *GreaterThanOrEqualNode
func (SqlLiteralNode) GtEqAll ¶
func (node SqlLiteralNode) GtEqAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) GtEqAny ¶
func (node SqlLiteralNode) GtEqAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) In ¶
func (node SqlLiteralNode) In(visitables []Visitable) Visitable
func (SqlLiteralNode) InAll ¶
func (node SqlLiteralNode) InAll(visitableslices ...[]Visitable) Visitable
func (SqlLiteralNode) InAny ¶
func (node SqlLiteralNode) InAny(visitableslices ...[]Visitable) Visitable
func (SqlLiteralNode) Lt ¶
func (node SqlLiteralNode) Lt(visitable Visitable) *LessThanNode
func (SqlLiteralNode) LtAll ¶
func (node SqlLiteralNode) LtAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) LtAny ¶
func (node SqlLiteralNode) LtAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) LtEq ¶
func (node SqlLiteralNode) LtEq(visitable Visitable) *LessThanOrEqualNode
func (SqlLiteralNode) LtEqAll ¶
func (node SqlLiteralNode) LtEqAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) LtEqAny ¶
func (node SqlLiteralNode) LtEqAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) Matches ¶
func (node SqlLiteralNode) Matches(literal SqlLiteralNode) *MatchesNode
func (SqlLiteralNode) MatchesAll ¶
func (node SqlLiteralNode) MatchesAll(literals ...SqlLiteralNode) *GroupingNode
func (SqlLiteralNode) MatchesAny ¶
func (node SqlLiteralNode) MatchesAny(literals ...SqlLiteralNode) *GroupingNode
func (SqlLiteralNode) NotEq ¶
func (node SqlLiteralNode) NotEq(visitable Visitable) *NotEqualNode
func (SqlLiteralNode) NotEqAll ¶
func (node SqlLiteralNode) NotEqAll(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) NotEqAny ¶
func (node SqlLiteralNode) NotEqAny(visitables ...Visitable) *GroupingNode
func (SqlLiteralNode) NotIn ¶
func (node SqlLiteralNode) NotIn(visitables []Visitable) Visitable
func (SqlLiteralNode) NotInAll ¶
func (node SqlLiteralNode) NotInAll(visitableslices ...[]Visitable) Visitable
func (SqlLiteralNode) NotInAny ¶
func (node SqlLiteralNode) NotInAny(visitableslices ...[]Visitable) Visitable
func (SqlLiteralNode) String ¶
func (node SqlLiteralNode) String() string
type Table ¶
type Table struct { Name string Engine Engine TableAlias string Aliases *[]*TableAliasNode BaseVisitable }
func (*Table) Alias ¶
func (t *Table) Alias() *TableAliasNode
func (*Table) Attr ¶
func (t *Table) Attr(name string) *AttributeNode
func (*Table) From ¶
func (t *Table) From(relation *Table) *SelectManager
func (*Table) Group ¶
func (t *Table) Group(visitables ...Visitable) *SelectManager
func (*Table) Having ¶
func (t *Table) Having(visitables ...Visitable) *SelectManager
func (*Table) InnerJoin ¶
func (t *Table) InnerJoin(visitable Visitable) *SelectManager
func (*Table) InsertManager ¶
func (t *Table) InsertManager() *InsertManager
func (*Table) Join ¶
func (t *Table) Join(visitable Visitable) *SelectManager
func (*Table) Offset ¶
func (t *Table) Offset(i int) *SelectManager
func (*Table) Order ¶
func (t *Table) Order(visitables ...Visitable) *SelectManager
func (*Table) OuterJoin ¶
func (t *Table) OuterJoin(visitable Visitable) *SelectManager
func (*Table) Project ¶
func (t *Table) Project(visitables ...Visitable) *SelectManager
func (*Table) Select ¶
func (t *Table) Select(visitables ...Visitable) *SelectManager
func (*Table) SelectManager ¶
func (t *Table) SelectManager(relation *Table) *SelectManager
func (*Table) SetTableAlias ¶
func (*Table) Skip ¶
func (t *Table) Skip(i int) *SelectManager
func (*Table) Take ¶
func (t *Table) Take(i int) *SelectManager
func (*Table) Where ¶
func (t *Table) Where(visitable Visitable) *SelectManager
type TableAliasNode ¶
type TableAliasNode struct { Name string Quoted bool // Flag to indentify if the alias should be quoted Relation Visitable // Generally a *Table, *GroupingNode; a GroupingNode can allow a SelectStatement to be aliased BinaryNode }
func (*TableAliasNode) Attr ¶
func (t *TableAliasNode) Attr(name string) *AttributeNode
func (*TableAliasNode) String ¶
func (t *TableAliasNode) String() string
type ToSqlVisitor ¶
type ToSqlVisitor struct {
Conn Connector
}
func (*ToSqlVisitor) Accept ¶
func (v *ToSqlVisitor) Accept(visitable Visitable) string
func (ToSqlVisitor) Quote ¶
func (v ToSqlVisitor) Quote(thing interface{}) string
func (ToSqlVisitor) QuoteColumnName ¶
func (v ToSqlVisitor) QuoteColumnName(literal SqlLiteralNode) string
func (ToSqlVisitor) QuoteTableName ¶
func (v ToSqlVisitor) QuoteTableName(visitable Visitable) string
func (*ToSqlVisitor) Visit ¶
func (v *ToSqlVisitor) Visit(visitable Visitable) string
type TreeManager ¶
type TreeManager interface {
ToSql() string
}
type TrueNode ¶
type TrueNode struct {
BaseVisitable
}
type UnionAllNode ¶
type UnionAllNode BinaryNode
type UnionNode ¶
type UnionNode BinaryNode
type UnqualifiedColumnNode ¶
type UnqualifiedColumnNode struct { Expr *AttributeNode BaseVisitable }
func (*UnqualifiedColumnNode) Name ¶
func (node *UnqualifiedColumnNode) Name() SqlLiteralNode
type UpdateManager ¶
type UpdateManager struct { Engine Engine Ast *UpdateStatementNode BaseVisitable }
func NewUpdateManager ¶
func NewUpdateManager(engine Engine) *UpdateManager
func (*UpdateManager) From ¶
func (mgr *UpdateManager) From(relation *Table) *UpdateManager
func (*UpdateManager) Order ¶
func (mgr *UpdateManager) Order(expressions ...Visitable) *UpdateManager
func (*UpdateManager) Set ¶
func (mgr *UpdateManager) Set(field *AttributeNode, value Visitable) *UpdateManager
func (*UpdateManager) SetKey ¶
func (mgr *UpdateManager) SetKey(node *AttributeNode) *UpdateManager
func (*UpdateManager) Table ¶
func (mgr *UpdateManager) Table(relation *Table) *UpdateManager
func (*UpdateManager) Take ¶
func (mgr *UpdateManager) Take(limit int) *UpdateManager
func (*UpdateManager) ToSql ¶
func (mgr *UpdateManager) ToSql() string
func (*UpdateManager) Where ¶
func (mgr *UpdateManager) Where(visitable Visitable) *UpdateManager
type UpdateStatementNode ¶
type UpdateStatementNode struct { Relation *Table Wheres *[]Visitable Values *[]Visitable Orders *[]Visitable Limit *LimitNode Key Visitable // SqlLiteralNode AttributeNode BaseVisitable }
func NewUpdateStatementNode ¶
func NewUpdateStatementNode() *UpdateStatementNode
type ValuesNode ¶
type ValuesNode struct { Values []interface{} Columns []*AttributeNode BaseVisitable }
type Visitable ¶
type Visitable interface { NewTrueNode() *TrueNode NewFalseNode() *FalseNode NewTableAliasNode(*Table, string) *TableAliasNode NewInnerJoinNode() *InnerJoinNode NewOuterJoinNode() *OuterJoinNode NewAndNode(...Visitable) *AndNode NewOnNode(Visitable) *OnNode NewNotNode() *NotNode NewGroupingNode() *GroupingNode String() string }
type WindowNode ¶
type WindowNode struct { Orders *[]Visitable Framing Visitable BaseVisitable }
func (*WindowNode) Order ¶
func (node *WindowNode) Order(v Visitable) *WindowNode
type WithRecursiveNode ¶
type WithRecursiveNode UnaryNode
func NewWithRecursiveNode ¶
func NewWithRecursiveNode(visitable Visitable) *WithRecursiveNode
Source Files ¶
- alias_predications.go
- and_node.go
- as_node.go
- ascending_node.go
- attribute_node.go
- base_visitable.go
- bin_node.go
- binary_node.go
- bind_param_node.go
- count_node.go
- default_engine.go
- delete_manager.go
- delete_statement_node.go
- descending_node.go
- distinct_node.go
- equality_node.go
- exists_node.go
- extract_node.go
- false_node.go
- function_node.go
- grouping_node.go
- infix_operation_node.go
- insert_manager.go
- insert_statement_node.go
- interfaces.go
- join_source.go
- multi_statement_manager.go
- mysql_visitor.go
- named_function_node.go
- ordering.go
- over_node.go
- postgresql_visitor.go
- predications.go
- quoted_node.go
- select_core_node.go
- select_manager.go
- select_statement_node.go
- sql_literal_node.go
- sqlite_visitor.go
- table.go
- table_alias_node.go
- to_sql_visitor.go
- true_node.go
- unary_node.go
- unqualified_column_node.go
- update_manager.go
- update_statement_node.go
- values_node.go
- visitations.go
- window_node.go
- window_predications.go
Click to show internal directories.
Click to hide internal directories.