1
Fork 0

Introduced QEComment, constructor, likewise the VEComment constructor

This commit is contained in:
Han Joosten 2015-03-14 14:28:05 +01:00
parent 258eff5298
commit dc5ca57124
4 changed files with 22 additions and 25 deletions
Language/SQL/SimpleSQL

View file

@ -163,7 +163,7 @@
> | MultisetCtor [ValueExpr]
> | MultisetQueryCtor QueryExpr
> | NextValueFor [Name]
> | QEComment [Comment] ValueExpr
> | VEComment [Comment] ValueExpr
> deriving (Eq,Show,Read,Data,Typeable)
> -- | Represents an identifier name, which can be quoted or unquoted.
@ -281,7 +281,6 @@ This would make some things a bit cleaner?
> ,qeOrderBy :: [SortSpec]
> ,qeOffset :: Maybe ValueExpr
> ,qeFetchFirst :: Maybe ValueExpr
> ,qeComment :: [Comment]
> }
> | CombineQueryExpr
> {qe0 :: QueryExpr
@ -289,7 +288,6 @@ This would make some things a bit cleaner?
> ,qeSetQuantifier :: SetQuantifier
> ,qeCorresponding :: Corresponding
> ,qe1 :: QueryExpr
> ,qeComment :: [Comment]
> }
> | With
> {qeWithRecursive :: Bool
@ -297,6 +295,7 @@ This would make some things a bit cleaner?
> ,qeQueryExpression :: QueryExpr}
> | Values [[ValueExpr]]
> | Table [Name]
> | QEComment [Comment] QueryExpr
> deriving (Eq,Show,Read,Data,Typeable)
TODO: add queryexpr parens to deal with e.g.
@ -326,9 +325,7 @@ I'm not sure if this is valid syntax or not.
> ,qeHaving = Nothing
> ,qeOrderBy = []
> ,qeOffset = Nothing
> ,qeFetchFirst = Nothing
> ,qeComment = []}
> ,qeFetchFirst = Nothing}
> -- | Represents the Distinct or All keywords, which can be used
> -- before a select list, in an aggregate/window function
@ -392,6 +389,6 @@ I'm not sure if this is valid syntax or not.
> -- | Comment. Useful when geterating SQL code programmatically.
> data Comment = Comment String
> data Comment = BlockComment String
> deriving (Eq,Show,Read,Data,Typeable)