This module defines the AST structure generated by the parser and used for the translation of SQL statements.
Author: Julia Krone
Version: 0.1
Constructors:
Select
:: SelectHead -> Order -> (Maybe Int) -> Statement
Update
:: Table -> [Assign] -> Condition -> Statement
UpdateEntity
:: Table -> Value -> Statement
Delete
:: Table -> Condition -> Statement
Insert
:: Table -> [ColumnRef] -> [[Value]] -> Statement
Transaction
:: Statement
InTransaction
:: [Statement] -> Statement
Commit
:: Statement
Rollback
:: Statement
Constructors:
Constructors:
Unique
:: String -> Tab
Def
:: [String] -> Tab
Constructors:
I
:: Type
B
:: Type
F
:: Type
C
:: Type
S
:: Type
D
:: Type
Key
:: String -> Type
Entity
:: String -> Type
Unknown
:: Type
Constructors:
Constructors:
Emb
:: String -> Type -> Value
IntExp
:: Int -> Value
KeyExp
:: String -> Int -> Value
FloatExp
:: Float -> Value
StringExp
:: String -> Value
DateExp
:: CalendarTime -> Value
BoolExp
:: Bool -> Value
CharExp
:: Char -> Value
AbsNull
:: Value
Constructors:
Set
:: ASetOp -> SelectHead -> SelectHead -> SelectHead
Query
:: SelectClause -> TableRef -> Condition -> (Maybe Group) -> SelectHead
Constructors:
SelAll
:: ASpecifier -> SelectClause
SelColumns
:: ASpecifier -> [SelElement] -> SelectClause
Constructors:
Aggregation
:: AFun -> ASpecifier -> ColumnRef -> SelElement
Col
:: ColumnRef -> SelElement
Case
:: Condition -> Operand -> Operand -> SelElement
Constructors:
Table
:: String -> String -> Int -> Table
Constructors:
TableRef
:: Table -> (Maybe JoinClause) -> TableRef
Constructors:
CrossJoin
:: Table -> (Maybe JoinClause) -> JoinClause
InnerJoin
:: Table -> JoinCond -> (Maybe JoinClause) -> JoinClause
Constructors:
JC
:: Condition -> JoinCond
Constructors:
AAll
:: ASpecifier
ADistinct
:: ASpecifier
Constructors:
FK
:: (String,Int) -> AbsRel -> (String,Int) -> Condition
Cmp
:: ALogOp -> Condition -> Condition -> Condition
Not
:: Condition -> Condition
Exists
:: Statement -> Condition
IsNull
:: Operand -> Condition
NotNull
:: Operand -> Condition
AIn
:: Operand -> [Value] -> Condition
ABinOp
:: AstOp -> Operand -> Operand -> Condition
ABetween
:: Operand -> Operand -> Operand -> Condition
NoCond
:: Condition
Constructors:
AMToN
:: String -> AbsRel
ANToOne
:: String -> AbsRel
AOneToN
:: String -> AbsRel
NotSpec
:: String -> AbsRel
Type synonym: Operand = Either ColumnRef Value
Constructors:
ALth
:: AstOp
ALe
:: AstOp
AGth
:: AstOp
AGe
:: AstOp
AEq
:: AstOp
AUnEq
:: AstOp
ALike
:: AstOp
Constructors:
AAnd
:: ALogOp
AOr
:: ALogOp
Constructors:
AUnion
:: ASetOp
AExcept
:: ASetOp
AIntersect
:: ASetOp
Constructors:
Constructors:
SimpleHave
:: Condition -> Having
AggrHave
:: AFun -> ASpecifier -> ColumnRef -> AstOp -> Operand -> Having
Neg
:: Having -> Having
CmpHave
:: ALogOp -> Having -> Having -> Having
NoHave
:: Having
Constructors:
ASum
:: AFun
ACount
:: AFun
AAvg
:: AFun
AMin
:: AFun
AMax
:: AFun
Constructors:
Constructors:
Asc
:: Dir
Desc
:: Dir