diff --git a/Language/SQL/SimpleSQL/Syntax.lhs b/Language/SQL/SimpleSQL/Syntax.lhs index cb2dd80..53e3fc1 100644 --- a/Language/SQL/SimpleSQL/Syntax.lhs +++ b/Language/SQL/SimpleSQL/Syntax.lhs @@ -28,8 +28,9 @@ > ) where -> -- | Represents a value expression, i.e. expressions in select -> -- lists, where, group by, order by, etc. +> -- | 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. > data ValueExpr > = -- | a numeric literal optional decimal point, e+- > -- integral exponent, e.g @@ -189,10 +190,9 @@ > -- > -- * a common table expression (with); > -- -> -- * a values expression; +> -- * a table value constructor (values (1,2),(3,4)); or > -- -> -- * or the table syntax - 'table t', shorthand for 'select * from -> -- t'. +> -- * an explicit table (table t). > data QueryExpr > = Select > {qeSetQuantifier :: SetQuantifier @@ -233,7 +233,19 @@ TODO: add queryexpr parens to deal with e.g. I'm not sure if this is valid syntax or not. > -- | Helper/'default' value for query exprs to make creating query -> -- expr values a little easier. +> -- expr values a little easier. It is defined like this: +> -- +> -- > makeSelect :: QueryExpr +> -- > makeSelect = Select {qeSetQuantifier = All +> -- > ,qeSelectList = [] +> -- > ,qeFrom = [] +> -- > ,qeWhere = Nothing +> -- > ,qeGroupBy = [] +> -- > ,qeHaving = Nothing +> -- > ,qeOrderBy = [] +> -- > ,qeOffset = Nothing +> -- > ,qeFetch = Nothing} + > makeSelect :: QueryExpr > makeSelect = Select {qeSetQuantifier = All > ,qeSelectList = [] diff --git a/TODO b/TODO index ed9613c..eb26f4f 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,8 @@ New fixity code + extensive tests. check fixity in query expr level? check fixity in tablerefs +try and use the proper css theme + release checklist: hlint haddock review diff --git a/changelog b/changelog index cfb2216..0d4759d 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,5 @@ -0.3.0-dev (commit b68c116839cf852832cef28f3cd479ac7622293c) +0.3.0-dev (commit 3b2730fd9962b9a51ad659191ac842364dab86b4) + rename ScalarExpr -> ValueExpr rename Duplicates to SetQuantifier rename qeDuplicates to qeSetQuantifier rename OrderField to SortSpec