Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
The AST for SQL queries.
Synopsis
- data ValueExpr
- = NumLit String
- | StringLit String
- | IntervalLit { }
- | Iden [Name]
- | Star
- | App [Name] [ValueExpr]
- | AggregateApp {
- aggName :: [Name]
- aggDistinct :: SetQuantifier
- aggArgs :: [ValueExpr]
- aggOrderBy :: [SortSpec]
- aggFilter :: Maybe ValueExpr
- | AggregateAppGroup { }
- | WindowApp { }
- | BinOp ValueExpr [Name] ValueExpr
- | PrefixOp [Name] ValueExpr
- | PostfixOp [Name] ValueExpr
- | SpecialOp [Name] [ValueExpr]
- | SpecialOpK [Name] (Maybe ValueExpr) [(String, ValueExpr)]
- | Case { }
- | Parens ValueExpr
- | Cast ValueExpr TypeName
- | TypedLit TypeName String
- | SubQueryExpr SubQueryExprType QueryExpr
- | In Bool ValueExpr InPredValue
- | Parameter
- | HostParameter String (Maybe String)
- | QuantifiedComparison ValueExpr [Name] CompPredQuantifier QueryExpr
- | Match ValueExpr Bool QueryExpr
- | Array ValueExpr [ValueExpr]
- | ArrayCtor QueryExpr
- | CSStringLit String String
- | Escape ValueExpr Char
- | UEscape ValueExpr Char
- | Collate ValueExpr [Name]
- | MultisetBinOp ValueExpr CombineOp SetQuantifier ValueExpr
- | MultisetCtor [ValueExpr]
- | MultisetQueryCtor QueryExpr
- | NextValueFor [Name]
- | VEComment [Comment] ValueExpr
- data Name
- data TypeName
- = TypeName [Name]
- | PrecTypeName [Name] Integer
- | PrecScaleTypeName [Name] Integer Integer
- | PrecLengthTypeName [Name] Integer (Maybe PrecMultiplier) (Maybe PrecUnits)
- | CharTypeName [Name] (Maybe Integer) [Name] [Name]
- | TimeTypeName [Name] (Maybe Integer) Bool
- | RowTypeName [(Name, TypeName)]
- | IntervalTypeName IntervalTypeField (Maybe IntervalTypeField)
- | ArrayTypeName TypeName (Maybe Integer)
- | MultisetTypeName TypeName
- data IntervalTypeField = Itf String (Maybe (Integer, Maybe Integer))
- data PrecMultiplier
- data PrecUnits
- data SetQuantifier
- data SortSpec = SortSpec ValueExpr Direction NullsOrder
- data Direction
- = DirDefault
- | Asc
- | Desc
- data NullsOrder
- data InPredValue
- data SubQueryExprType
- data CompPredQuantifier
- data Frame
- data FrameRows
- data FramePos
- data QueryExpr
- = Select {
- qeSetQuantifier :: SetQuantifier
- qeSelectList :: [(ValueExpr, Maybe Name)]
- qeFrom :: [TableRef]
- qeWhere :: Maybe ValueExpr
- qeGroupBy :: [GroupingExpr]
- qeHaving :: Maybe ValueExpr
- qeOrderBy :: [SortSpec]
- qeOffset :: Maybe ValueExpr
- qeFetchFirst :: Maybe ValueExpr
- | CombineQueryExpr { }
- | With {
- qeWithRecursive :: Bool
- qeViews :: [(Alias, QueryExpr)]
- qeQueryExpression :: QueryExpr
- | Values [[ValueExpr]]
- | Table [Name]
- | QEComment [Comment] QueryExpr
- = Select {
- makeSelect :: QueryExpr
- data CombineOp
- data Corresponding
- data Alias = Alias Name (Maybe [Name])
- data GroupingExpr
- data TableRef
- data JoinType
- data JoinCondition
- data Dialect
- data Comment = BlockComment String
Value expressions
Represents a value expression. This is used for the expressions in select lists. It is also used for expressions in where, group by, having, order by and so on.
NumLit String | a numeric literal optional decimal point, e+- integral exponent, e.g
|
StringLit String | string literal, currently only basic strings between single quotes with a single quote escaped using '' |
IntervalLit | text of interval literal, units of interval precision, e.g. interval 3 days (3) |
| |
Iden [Name] | identifier with parts separated by dots |
Star | star, as in select *, t.*, count(*) |
App [Name] [ValueExpr] | function application (anything that looks like c style function application syntactically) |
AggregateApp | aggregate application, which adds distinct or all, and order by, to regular function application |
| |
AggregateAppGroup | aggregates with within group |
WindowApp | window application, which adds over (partition by a order by b) to regular function application. Explicit frames are not currently supported |
BinOp ValueExpr [Name] ValueExpr | Infix binary operators. This is used for symbol operators (a + b), keyword operators (a and b) and multiple keyword operators (a is similar to b) |
PrefixOp [Name] ValueExpr | Prefix unary operators. This is used for symbol operators, keyword operators and multiple keyword operators. |
PostfixOp [Name] ValueExpr | Postfix unary operators. This is used for symbol operators, keyword operators and multiple keyword operators. |
SpecialOp [Name] [ValueExpr] | Used for ternary, mixfix and other non orthodox operators. Currently used for row constructors, and for between. |
SpecialOpK [Name] (Maybe ValueExpr) [(String, ValueExpr)] | Used for the operators which look like functions except the arguments are separated by keywords instead of commas. The maybe is for the first unnamed argument if it is present, and the list is for the keyword argument pairs. |
Case | case expression. both flavours supported |
Parens ValueExpr | |
Cast ValueExpr TypeName | cast(a as typename) |
TypedLit TypeName String | prefix 'typed literal', e.g. int '42' |
SubQueryExpr SubQueryExprType QueryExpr | exists, all, any, some subqueries |
In Bool ValueExpr InPredValue | in list literal and in subquery, if the bool is false it means not in was used ('a not in (1,2)') |
Parameter | Represents a ? in a parameterized query |
HostParameter String (Maybe String) | represents a host parameter, e.g. :a. The Maybe String is for the indicator, e.g. :var indicator :nl |
QuantifiedComparison ValueExpr [Name] CompPredQuantifier QueryExpr | |
Match ValueExpr Bool QueryExpr | |
Array ValueExpr [ValueExpr] | represents an array access expression, or an array ctor e.g. a[3]. The first valueExpr is the array, the second is the subscripts/ctor args |
ArrayCtor QueryExpr | this is used for the query expression version of array constructors, e.g. array(select * from t) |
CSStringLit String String | |
Escape ValueExpr Char | |
UEscape ValueExpr Char | |
Collate ValueExpr [Name] | |
MultisetBinOp ValueExpr CombineOp SetQuantifier ValueExpr | |
MultisetCtor [ValueExpr] | |
MultisetQueryCtor QueryExpr | |
NextValueFor [Name] | |
VEComment [Comment] ValueExpr |
Instances
Eq ValueExpr Source # | |
Data ValueExpr Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ValueExpr -> c ValueExpr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ValueExpr # toConstr :: ValueExpr -> Constr # dataTypeOf :: ValueExpr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ValueExpr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ValueExpr) # gmapT :: (forall b. Data b => b -> b) -> ValueExpr -> ValueExpr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ValueExpr -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ValueExpr -> r # gmapQ :: (forall d. Data d => d -> u) -> ValueExpr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ValueExpr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ValueExpr -> m ValueExpr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ValueExpr -> m ValueExpr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ValueExpr -> m ValueExpr # | |
Read ValueExpr Source # | |
Show ValueExpr Source # | |
Represents an identifier name, which can be quoted or unquoted.
Name String | |
QName String | |
UQName String | |
DQName String String String | dialect quoted name, the fields are start quote, end quote and the string itself, e.g. |
Instances
Eq Name Source # | |
Data Name Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name # dataTypeOf :: Name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) # gmapT :: (forall b. Data b => b -> b) -> Name -> Name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r # gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name # | |
Read Name Source # | |
Show Name Source # | |
Represents a type name, used in casts.
Instances
Eq TypeName Source # | |
Data TypeName Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeName -> c TypeName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeName # toConstr :: TypeName -> Constr # dataTypeOf :: TypeName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeName) # gmapT :: (forall b. Data b => b -> b) -> TypeName -> TypeName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeName -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeName -> r # gmapQ :: (forall d. Data d => d -> u) -> TypeName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeName -> m TypeName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeName -> m TypeName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeName -> m TypeName # | |
Read TypeName Source # | |
Show TypeName Source # | |
data IntervalTypeField Source #
Instances
data PrecMultiplier Source #
Instances
Instances
Eq PrecUnits Source # | |
Data PrecUnits Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrecUnits -> c PrecUnits # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrecUnits # toConstr :: PrecUnits -> Constr # dataTypeOf :: PrecUnits -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PrecUnits) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrecUnits) # gmapT :: (forall b. Data b => b -> b) -> PrecUnits -> PrecUnits # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrecUnits -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrecUnits -> r # gmapQ :: (forall d. Data d => d -> u) -> PrecUnits -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PrecUnits -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrecUnits -> m PrecUnits # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecUnits -> m PrecUnits # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecUnits -> m PrecUnits # | |
Read PrecUnits Source # | |
Show PrecUnits Source # | |
data SetQuantifier Source #
Represents the Distinct or All keywords, which can be used before a select list, in an aggregate/window function application, or in a query expression set operator.
Instances
Represents one field in an order by list.
Instances
Eq SortSpec Source # | |
Data SortSpec Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SortSpec -> c SortSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SortSpec # toConstr :: SortSpec -> Constr # dataTypeOf :: SortSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SortSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SortSpec) # gmapT :: (forall b. Data b => b -> b) -> SortSpec -> SortSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SortSpec -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SortSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> SortSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SortSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SortSpec -> m SortSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SortSpec -> m SortSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SortSpec -> m SortSpec # | |
Read SortSpec Source # | |
Show SortSpec Source # | |
The direction for a column in order by.
Instances
Eq Direction Source # | |
Data Direction Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Direction -> c Direction # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Direction # toConstr :: Direction -> Constr # dataTypeOf :: Direction -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Direction) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Direction) # gmapT :: (forall b. Data b => b -> b) -> Direction -> Direction # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Direction -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Direction -> r # gmapQ :: (forall d. Data d => d -> u) -> Direction -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Direction -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Direction -> m Direction # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Direction -> m Direction # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Direction -> m Direction # | |
Read Direction Source # | |
Show Direction Source # | |
data NullsOrder Source #
Represents 'nulls first' or 'nulls last' in an order by clause.
Instances
data InPredValue Source #
Used for 'expr in (value expression list)', and 'expr in (subquery)' syntax.
Instances
data SubQueryExprType Source #
A subquery in a value expression.
Instances
data CompPredQuantifier Source #
Instances
Represents the frame clause of a window this can be [range | rows] frame_start or [range | rows] between frame_start and frame_end
Instances
Eq Frame Source # | |
Data Frame Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Frame -> c Frame # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Frame # dataTypeOf :: Frame -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Frame) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Frame) # gmapT :: (forall b. Data b => b -> b) -> Frame -> Frame # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Frame -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Frame -> r # gmapQ :: (forall d. Data d => d -> u) -> Frame -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Frame -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Frame -> m Frame # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Frame -> m Frame # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Frame -> m Frame # | |
Read Frame Source # | |
Show Frame Source # | |
Represents whether a window frame clause is over rows or ranges.
Instances
Eq FrameRows Source # | |
Data FrameRows Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FrameRows -> c FrameRows # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FrameRows # toConstr :: FrameRows -> Constr # dataTypeOf :: FrameRows -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FrameRows) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FrameRows) # gmapT :: (forall b. Data b => b -> b) -> FrameRows -> FrameRows # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FrameRows -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FrameRows -> r # gmapQ :: (forall d. Data d => d -> u) -> FrameRows -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FrameRows -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FrameRows -> m FrameRows # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FrameRows -> m FrameRows # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FrameRows -> m FrameRows # | |
Read FrameRows Source # | |
Show FrameRows Source # | |
represents the start or end of a frame
Instances
Eq FramePos Source # | |
Data FramePos Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FramePos -> c FramePos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FramePos # toConstr :: FramePos -> Constr # dataTypeOf :: FramePos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FramePos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FramePos) # gmapT :: (forall b. Data b => b -> b) -> FramePos -> FramePos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FramePos -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FramePos -> r # gmapQ :: (forall d. Data d => d -> u) -> FramePos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FramePos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FramePos -> m FramePos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FramePos -> m FramePos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FramePos -> m FramePos # | |
Read FramePos Source # | |
Show FramePos Source # | |
Query expressions
Represents a query expression, which can be:
- a regular select;
- a set operator (union, except, intersect);
- a common table expression (with);
- a table value constructor (values (1,2),(3,4)); or
- an explicit table (table t).
Select | |
| |
CombineQueryExpr | |
With | |
| |
Values [[ValueExpr]] | |
Table [Name] | |
QEComment [Comment] QueryExpr |
Instances
Eq QueryExpr Source # | |
Data QueryExpr Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QueryExpr -> c QueryExpr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QueryExpr # toConstr :: QueryExpr -> Constr # dataTypeOf :: QueryExpr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c QueryExpr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QueryExpr) # gmapT :: (forall b. Data b => b -> b) -> QueryExpr -> QueryExpr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QueryExpr -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QueryExpr -> r # gmapQ :: (forall d. Data d => d -> u) -> QueryExpr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> QueryExpr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> QueryExpr -> m QueryExpr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryExpr -> m QueryExpr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryExpr -> m QueryExpr # | |
Read QueryExpr Source # | |
Show QueryExpr Source # | |
makeSelect :: QueryExpr Source #
Helper/'default' value for query exprs to make creating query expr values a little easier. It is defined like this:
makeSelect :: QueryExpr makeSelect = Select {qeSetQuantifier = SQDefault ,qeSelectList = [] ,qeFrom = [] ,qeWhere = Nothing ,qeGroupBy = [] ,qeHaving = Nothing ,qeOrderBy = [] ,qeOffset = Nothing ,qeFetchFirst = Nothing}
Query expression set operators.
Instances
Eq CombineOp Source # | |
Data CombineOp Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CombineOp -> c CombineOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CombineOp # toConstr :: CombineOp -> Constr # dataTypeOf :: CombineOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CombineOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CombineOp) # gmapT :: (forall b. Data b => b -> b) -> CombineOp -> CombineOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CombineOp -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CombineOp -> r # gmapQ :: (forall d. Data d => d -> u) -> CombineOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CombineOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CombineOp -> m CombineOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CombineOp -> m CombineOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CombineOp -> m CombineOp # | |
Read CombineOp Source # | |
Show CombineOp Source # | |
data Corresponding Source #
Corresponding, an option for the set operators.
Instances
Represents an alias for a table valued expression, used in with queries and in from alias, e.g. select a from t u, select a from t u(b), with a(c) as select 1, select * from a.
Instances
Eq Alias Source # | |
Data Alias Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Alias -> c Alias # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Alias # dataTypeOf :: Alias -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Alias) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Alias) # gmapT :: (forall b. Data b => b -> b) -> Alias -> Alias # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alias -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alias -> r # gmapQ :: (forall d. Data d => d -> u) -> Alias -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Alias -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alias -> m Alias # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alias -> m Alias # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alias -> m Alias # | |
Read Alias Source # | |
Show Alias Source # | |
data GroupingExpr Source #
Represents an item in a group by clause.
GroupingParens [GroupingExpr] | |
Cube [GroupingExpr] | |
Rollup [GroupingExpr] | |
GroupingSets [GroupingExpr] | |
SimpleGroup ValueExpr |
Instances
From
Represents a entry in the csv of tables in the from clause.
TRSimple [Name] | from t / from s.t |
TRJoin TableRef Bool JoinType TableRef (Maybe JoinCondition) | from a join b, the bool is true if natural was used |
TRParens TableRef | from (a) |
TRAlias TableRef Alias | from a as b(c,d) |
TRQueryExpr QueryExpr | from (query expr) |
TRFunction [Name] [ValueExpr] | from function(args) |
TRLateral TableRef | from lateral t |
Instances
Eq TableRef Source # | |
Data TableRef Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TableRef -> c TableRef # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TableRef # toConstr :: TableRef -> Constr # dataTypeOf :: TableRef -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TableRef) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableRef) # gmapT :: (forall b. Data b => b -> b) -> TableRef -> TableRef # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TableRef -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TableRef -> r # gmapQ :: (forall d. Data d => d -> u) -> TableRef -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TableRef -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TableRef -> m TableRef # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TableRef -> m TableRef # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TableRef -> m TableRef # | |
Read TableRef Source # | |
Show TableRef Source # | |
The type of a join.
Instances
Eq JoinType Source # | |
Data JoinType Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> JoinType -> c JoinType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c JoinType # toConstr :: JoinType -> Constr # dataTypeOf :: JoinType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c JoinType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinType) # gmapT :: (forall b. Data b => b -> b) -> JoinType -> JoinType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> JoinType -> r # gmapQ :: (forall d. Data d => d -> u) -> JoinType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> JoinType -> m JoinType # | |
Read JoinType Source # | |
Show JoinType Source # | |
data JoinCondition Source #
The join condition.
Instances
dialect
Used to set the dialect used for parsing and pretty printing, very unfinished at the moment.
Instances
Eq Dialect Source # | |
Data Dialect Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dialect -> c Dialect # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Dialect # toConstr :: Dialect -> Constr # dataTypeOf :: Dialect -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Dialect) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Dialect) # gmapT :: (forall b. Data b => b -> b) -> Dialect -> Dialect # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dialect -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dialect -> r # gmapQ :: (forall d. Data d => d -> u) -> Dialect -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Dialect -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dialect -> m Dialect # | |
Read Dialect Source # | |
Show Dialect Source # | |
comment
Comment. Useful when generating SQL code programmatically.
Instances
Eq Comment Source # | |
Data Comment Source # | |
Defined in Language.SQL.SimpleSQL.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Comment -> c Comment # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Comment # toConstr :: Comment -> Constr # dataTypeOf :: Comment -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Comment) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment) # gmapT :: (forall b. Data b => b -> b) -> Comment -> Comment # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQ :: (forall d. Data d => d -> u) -> Comment -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Comment -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # | |
Read Comment Source # | |
Show Comment Source # | |