Safe Haskell | None |
---|---|
Language | Haskell98 |
Database.Algebra.Table.Lang
Description
A representation of table algebra operators over multiset relations.
- data SortDir
- data AggrType
- data ATy where
- data AVal where
- type Attr = String
- type ResAttr = Attr
- type PartAttr = Attr
- type LeftAttr = Attr
- type RightAttr = Attr
- type TableName = String
- type TypedAttr = (Attr, ATy)
- newtype Key = Key [Attr]
- type SortSpec = (Expr, SortDir)
- data BinFun
- data UnFun
- data Expr
- type PartExpr = Expr
- type Proj = (ResAttr, Expr)
- type Tuple = [AVal]
- type SchemaInfos = [(Attr, ATy)]
- data JoinRel
- data FrameStart
- data FrameEnd
- data FrameBounds
- data WinFun
- data NullOp
- newtype DescrCol = DescrCol Attr
- data SerializeOrder
- newtype PayloadCol = PayloadCol Attr
- data UnOp
- = RowNum (Attr, [SortSpec], [PartExpr])
- | RowRank (ResAttr, [SortSpec])
- | WinFun ((ResAttr, WinFun), [PartExpr], [SortSpec], Maybe FrameBounds)
- | Rank (ResAttr, [SortSpec])
- | Project [(Attr, Expr)]
- | Select Expr
- | Distinct ()
- | Aggr ([(AggrType, ResAttr)], [(PartAttr, Expr)])
- | Serialize (Maybe DescrCol, SerializeOrder, [PayloadCol])
- data BinOp
- type TableAlgebra = Algebra () BinOp UnOp NullOp AlgNode
- replace :: Eq a => a -> a -> a -> a
- replaceChild :: forall t b u n c. Eq c => c -> c -> Algebra t b u n c -> Algebra t b u n c
Documentation
Sorting rows in a direction
table algebra types At this level we do not have any structural types anymore those are represented by columns.
Wrapper around values that can occur in an table algebra plan
Name of an attribute in which the result of an expression, aggregate or window function is stored.
Left attribute name, used to represent the left argument when applying binary operators
Right attribute name, used to represent the right argument when applying binary operators
Key of a database table, a key consists of multiple column names
Binary functions and operators in expressions
Unary functions/operators in expressions
Projection expressions
type SchemaInfos = [(Attr, ATy)] Source
Schema information, represents a table structure, the first element of the tuple is the column name the second its type.
Comparison operators which can be used for ThetaJoins.
data FrameStart Source
Window frame start specification
Constructors
FSUnboundPrec | UNBOUNDED PRECEDING |
FSValPrec Int | value PRECEDING |
FSCurrRow | CURRENT ROW |
Instances
Window frame end specification
Constructors
FECurrRow | CURRENT ROW |
FEValFol Int | value FOLLOWING |
FEUnboundFol | UNBOUNDED FOLLOWING |
data FrameBounds Source
Constructors
HalfOpenFrame FrameStart | |
ClosedFrame FrameStart FrameEnd |
data SerializeOrder Source
Declare need for position columns in the query result. The distinction between AbsPos and RelPos is only relevant for the optimizer: AbsPos signals that the actual pos values are required. RelPos signals that only the order induced by the pos column is relevant.
Constructors
RowNum (Attr, [SortSpec], [PartExpr]) | |
RowRank (ResAttr, [SortSpec]) | |
WinFun ((ResAttr, WinFun), [PartExpr], [SortSpec], Maybe FrameBounds) | |
Rank (ResAttr, [SortSpec]) | |
Project [(Attr, Expr)] | |
Select Expr | |
Distinct () | |
Aggr ([(AggrType, ResAttr)], [(PartAttr, Expr)]) | |
Serialize (Maybe DescrCol, SerializeOrder, [PayloadCol]) |
replaceChild :: forall t b u n c. Eq c => c -> c -> Algebra t b u n c -> Algebra t b u n c Source