Safe Haskell | None |
---|---|
Language | Haskell2010 |
Modular finally tagless extension of SQL99 and SQL92 syntaxes for various SQL2003 core and optional features.
Synopsis
- module Database.Beam.Backend.SQL.SQL99
-
class
IsSql92FromSyntax
from =>
IsSql2003FromSyntax
from
where
- type Sql2003FromSampleMethodSyntax from :: Type
- fromTableSample :: Sql92FromTableSourceSyntax from -> Sql2003FromSampleMethodSyntax from -> Maybe Double -> Maybe Integer -> Maybe Text -> from
-
class
IsSql92OrderingSyntax
ord =>
IsSql2003OrderingElementaryOLAPOperationsSyntax
ord
where
- nullsFirstOrdering , nullsLastOrdering :: ord -> ord
-
class
(
IsSql99ExpressionSyntax
expr,
IsSql2003WindowFrameSyntax
(
Sql2003ExpressionWindowFrameSyntax
expr)) =>
IsSql2003ExpressionSyntax
expr
where
- type Sql2003ExpressionWindowFrameSyntax expr :: Type
- overE :: expr -> Sql2003ExpressionWindowFrameSyntax expr -> expr
- rowNumberE :: expr
-
class
IsSql2003ExpressionSyntax
expr =>
IsSql2003ExpressionElementaryOLAPOperationsSyntax
expr
where
- filterAggE :: expr -> expr -> expr
- rankAggE :: expr
-
class
IsSql2003ExpressionSyntax
expr =>
IsSql2003ExpressionAdvancedOLAPOperationsSyntax
expr
where
- percentRankAggE :: expr
- denseRankAggE :: expr
- cumeDistAggE :: expr
-
class
IsSql99DataTypeSyntax
dataType =>
IsSql2003BinaryAndVarBinaryDataTypeSyntax
dataType
where
- binaryType :: Maybe Word -> dataType
- varBinaryType :: Maybe Word -> dataType
-
class
IsSql2003WindowFrameBoundsSyntax
(
Sql2003WindowFrameBoundsSyntax
frame) =>
IsSql2003WindowFrameSyntax
frame
where
- type Sql2003WindowFrameExpressionSyntax frame :: Type
- type Sql2003WindowFrameOrderingSyntax frame :: Type
- type Sql2003WindowFrameBoundsSyntax frame :: Type
- frameSyntax :: Maybe [ Sql2003WindowFrameExpressionSyntax frame] -> Maybe [ Sql2003WindowFrameOrderingSyntax frame] -> Maybe ( Sql2003WindowFrameBoundsSyntax frame) -> frame
-
class
IsSql2003WindowFrameBoundSyntax
(
Sql2003WindowFrameBoundsBoundSyntax
bounds) =>
IsSql2003WindowFrameBoundsSyntax
bounds
where
- type Sql2003WindowFrameBoundsBoundSyntax bounds :: Type
- fromToBoundSyntax :: Sql2003WindowFrameBoundsBoundSyntax bounds -> Maybe ( Sql2003WindowFrameBoundsBoundSyntax bounds) -> bounds
-
class
IsSql2003WindowFrameBoundSyntax
bound
where
- unboundedSyntax :: bound
- nrowsBoundSyntax :: Int -> bound
- class IsSql99ExpressionSyntax expr => IsSql2003EnhancedNumericFunctionsExpressionSyntax expr where
-
class
IsSql99AggregationExpressionSyntax
agg =>
IsSql2003EnhancedNumericFunctionsAggregationExpressionSyntax
agg
where
- stddevPopE , stddevSampE , varPopE , varSampE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg
- covarPopE , covarSampE , corrE , regrSlopeE , regrInterceptE , regrCountE , regrRSquaredE , regrAvgXE , regrAvgYE , regrSXXE , regrSXYE , regrSYYE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg
-
class
IsSql99AggregationExpressionSyntax
agg =>
IsSql2003FirstValueAndLastValueExpressionSyntax
agg
where
- firstValueE , lastValueE :: agg -> agg
-
class
IsSql99AggregationExpressionSyntax
agg =>
IsSql2003NtileExpressionSyntax
agg
where
- ntileE :: agg -> agg
-
class
IsSql99AggregationExpressionSyntax
agg =>
IsSql2003NthValueExpressionSyntax
agg
where
- nthValueE :: agg -> agg -> agg
- class IsSql99AggregationExpressionSyntax agg => IsSql2003LeadAndLagExpressionSyntax agg where
-
class
IsSql99DataTypeSyntax
dataType =>
IsSql2008BigIntDataTypeSyntax
dataType
where
- bigIntType :: dataType
- type Sql2003SanityCheck syntax = ( Sql92ExpressionSyntax syntax ~ Sql2003WindowFrameExpressionSyntax ( Sql2003ExpressionWindowFrameSyntax ( Sql92ExpressionSyntax syntax)), Sql92SelectOrderingSyntax ( Sql92SelectSyntax syntax) ~ Sql2003WindowFrameOrderingSyntax ( Sql2003ExpressionWindowFrameSyntax ( Sql92ExpressionSyntax syntax)))
Documentation
class IsSql92FromSyntax from => IsSql2003FromSyntax from where Source #
type Sql2003FromSampleMethodSyntax from :: Type Source #
fromTableSample :: Sql92FromTableSourceSyntax from -> Sql2003FromSampleMethodSyntax from -> Maybe Double -> Maybe Integer -> Maybe Text -> from Source #
class IsSql92OrderingSyntax ord => IsSql2003OrderingElementaryOLAPOperationsSyntax ord where Source #
Optional SQL2003 "Elementary OLAP operations" T611 support
nullsFirstOrdering :: ord -> ord Source #
nullsLastOrdering :: ord -> ord Source #
class ( IsSql99ExpressionSyntax expr, IsSql2003WindowFrameSyntax ( Sql2003ExpressionWindowFrameSyntax expr)) => IsSql2003ExpressionSyntax expr where Source #
type Sql2003ExpressionWindowFrameSyntax expr :: Type Source #
overE :: expr -> Sql2003ExpressionWindowFrameSyntax expr -> expr Source #
rowNumberE :: expr Source #
class IsSql2003ExpressionSyntax expr => IsSql2003ExpressionElementaryOLAPOperationsSyntax expr where Source #
Optional SQL2003 "Elementary OLAP operations" T611 support
class IsSql2003ExpressionSyntax expr => IsSql2003ExpressionAdvancedOLAPOperationsSyntax expr where Source #
Optional SQL2003 "Advanced OLAP operations" T612 support
class IsSql99DataTypeSyntax dataType => IsSql2003BinaryAndVarBinaryDataTypeSyntax dataType where Source #
Optional SQL2003 "BINARY AND VARBINARY data type" T021 support
binaryType :: Maybe Word -> dataType Source #
varBinaryType :: Maybe Word -> dataType Source #
class IsSql2003WindowFrameBoundsSyntax ( Sql2003WindowFrameBoundsSyntax frame) => IsSql2003WindowFrameSyntax frame where Source #
type Sql2003WindowFrameExpressionSyntax frame :: Type Source #
type Sql2003WindowFrameOrderingSyntax frame :: Type Source #
type Sql2003WindowFrameBoundsSyntax frame :: Type Source #
frameSyntax :: Maybe [ Sql2003WindowFrameExpressionSyntax frame] -> Maybe [ Sql2003WindowFrameOrderingSyntax frame] -> Maybe ( Sql2003WindowFrameBoundsSyntax frame) -> frame Source #
Instances
IsSql2003WindowFrameSyntax WindowFrame Source # | |
IsSql2003WindowFrameSyntax SqlSyntaxBuilder Source # | |
class IsSql2003WindowFrameBoundSyntax ( Sql2003WindowFrameBoundsBoundSyntax bounds) => IsSql2003WindowFrameBoundsSyntax bounds where Source #
type Sql2003WindowFrameBoundsBoundSyntax bounds :: Type Source #
fromToBoundSyntax :: Sql2003WindowFrameBoundsBoundSyntax bounds -> Maybe ( Sql2003WindowFrameBoundsBoundSyntax bounds) -> bounds Source #
class IsSql2003WindowFrameBoundSyntax bound where Source #
unboundedSyntax :: bound Source #
nrowsBoundSyntax :: Int -> bound Source #
Instances
class IsSql99ExpressionSyntax expr => IsSql2003EnhancedNumericFunctionsExpressionSyntax expr where Source #
Optional SQL2003 "Enhanced numeric functions" T621 support
Instances
IsSql2003EnhancedNumericFunctionsExpressionSyntax Expression Source # | |
Defined in Database.Beam.Backend.SQL.AST lnE :: Expression -> Expression Source # expE :: Expression -> Expression Source # sqrtE :: Expression -> Expression Source # ceilE :: Expression -> Expression Source # floorE :: Expression -> Expression Source # powerE :: Expression -> Expression -> Expression Source # |
class IsSql99AggregationExpressionSyntax agg => IsSql2003EnhancedNumericFunctionsAggregationExpressionSyntax agg where Source #
stddevPopE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg Source #
stddevSampE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg Source #
varPopE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg Source #
varSampE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg Source #
covarPopE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
covarSampE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
corrE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrSlopeE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrInterceptE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrCountE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrRSquaredE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrAvgXE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrAvgYE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrSXXE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrSXYE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
regrSYYE :: Maybe ( Sql92AggregationSetQuantifierSyntax agg) -> agg -> agg -> agg Source #
Instances
class IsSql99AggregationExpressionSyntax agg => IsSql2003FirstValueAndLastValueExpressionSyntax agg where Source #
Optional SQL2003 "FIRST_VALUE and LAST_VALUE function" T616 support
firstValueE :: agg -> agg Source #
lastValueE :: agg -> agg Source #
class IsSql99AggregationExpressionSyntax agg => IsSql2003NtileExpressionSyntax agg where Source #
Optional SQL2003 "NTILE function" T614 support
Instances
class IsSql99AggregationExpressionSyntax agg => IsSql2003NthValueExpressionSyntax agg where Source #
Optional SQL2003 "NTH_VALUE function" T618 support
Instances
class IsSql99AggregationExpressionSyntax agg => IsSql2003LeadAndLagExpressionSyntax agg where Source #
Optional SQL2003 "LEAD and LAG function" T615 support
Instances
IsSql2003LeadAndLagExpressionSyntax Expression Source # | |
Defined in Database.Beam.Backend.SQL.AST leadE :: Expression -> Maybe Expression -> Maybe Expression -> Expression Source # lagE :: Expression -> Maybe Expression -> Maybe Expression -> Expression Source # |
class IsSql99DataTypeSyntax dataType => IsSql2008BigIntDataTypeSyntax dataType where Source #
Optional SQL2008 "BIGINT data type" T071 support
bigIntType :: dataType Source #
Instances
type Sql2003SanityCheck syntax = ( Sql92ExpressionSyntax syntax ~ Sql2003WindowFrameExpressionSyntax ( Sql2003ExpressionWindowFrameSyntax ( Sql92ExpressionSyntax syntax)), Sql92SelectOrderingSyntax ( Sql92SelectSyntax syntax) ~ Sql2003WindowFrameOrderingSyntax ( Sql2003ExpressionWindowFrameSyntax ( Sql92ExpressionSyntax syntax))) Source #