rename qeFetch to qeFetchFirst
This commit is contained in:
parent
a231c7e9f8
commit
40c64c7631
|
@ -38,9 +38,37 @@ because the parser applies the fixity fix to every 'top level' value
|
||||||
expr, we don't need to descend into query exprs to find the value
|
expr, we don't need to descend into query exprs to find the value
|
||||||
exprs inside them.
|
exprs inside them.
|
||||||
|
|
||||||
start creating test list
|
start creating test list:
|
||||||
|
|
||||||
|
create tests with an explicit fixity table to check the features of
|
||||||
|
the fixity code, then create tests for sql value expressions which
|
||||||
|
sanity check the fixity applied to these expressions.
|
||||||
|
|
||||||
|
basic fixity tests:
|
||||||
|
|
||||||
|
a + b + c
|
||||||
|
a + b * c
|
||||||
|
a * b + c
|
||||||
|
a + b + c * d
|
||||||
|
a * b + c + d
|
||||||
|
|
||||||
|
try also with right assocative
|
||||||
|
|
||||||
|
a HI b PostfixLow
|
||||||
|
|
||||||
|
a low b PostfixHigh
|
||||||
|
|
||||||
|
a LOWEST b HI c PostfixMEDIUM
|
||||||
|
+ variations
|
||||||
|
|
||||||
|
same with prefix
|
||||||
|
same with chained binops
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
now sanity check the basic operators (these use BinOp, PrefixOp,
|
||||||
|
PostfixOp) then sanity check all the other operators which take part
|
||||||
|
in the fixity
|
||||||
|
|
||||||
|
|
||||||
> {-# LANGUAGE TupleSections #-}
|
> {-# LANGUAGE TupleSections #-}
|
||||||
|
|
|
@ -211,7 +211,7 @@ This would make some things a bit cleaner?
|
||||||
> ,qeHaving :: Maybe ValueExpr
|
> ,qeHaving :: Maybe ValueExpr
|
||||||
> ,qeOrderBy :: [SortSpec]
|
> ,qeOrderBy :: [SortSpec]
|
||||||
> ,qeOffset :: Maybe ValueExpr
|
> ,qeOffset :: Maybe ValueExpr
|
||||||
> ,qeFetch :: Maybe ValueExpr
|
> ,qeFetchFirst :: Maybe ValueExpr
|
||||||
> }
|
> }
|
||||||
> | CombineQueryExpr
|
> | CombineQueryExpr
|
||||||
> {qe0 :: QueryExpr
|
> {qe0 :: QueryExpr
|
||||||
|
@ -244,7 +244,7 @@ I'm not sure if this is valid syntax or not.
|
||||||
> -- > ,qeHaving = Nothing
|
> -- > ,qeHaving = Nothing
|
||||||
> -- > ,qeOrderBy = []
|
> -- > ,qeOrderBy = []
|
||||||
> -- > ,qeOffset = Nothing
|
> -- > ,qeOffset = Nothing
|
||||||
> -- > ,qeFetch = Nothing}
|
> -- > ,qeFetchFirst = Nothing}
|
||||||
|
|
||||||
> makeSelect :: QueryExpr
|
> makeSelect :: QueryExpr
|
||||||
> makeSelect = Select {qeSetQuantifier = All
|
> makeSelect = Select {qeSetQuantifier = All
|
||||||
|
@ -255,7 +255,7 @@ I'm not sure if this is valid syntax or not.
|
||||||
> ,qeHaving = Nothing
|
> ,qeHaving = Nothing
|
||||||
> ,qeOrderBy = []
|
> ,qeOrderBy = []
|
||||||
> ,qeOffset = Nothing
|
> ,qeOffset = Nothing
|
||||||
> ,qeFetch = Nothing}
|
> ,qeFetchFirst = Nothing}
|
||||||
|
|
||||||
|
|
||||||
> -- | Represents the Distinct or All keywords, which can be used
|
> -- | Represents the Distinct or All keywords, which can be used
|
||||||
|
|
7
TODO
7
TODO
|
@ -5,6 +5,11 @@ check fixity in query expr level?
|
||||||
check fixity in tablerefs
|
check fixity in tablerefs
|
||||||
|
|
||||||
try and use the proper css theme
|
try and use the proper css theme
|
||||||
|
create a header like in the haddock with simple-sql-parser +
|
||||||
|
contents link
|
||||||
|
change the toc gen so that it works the same as in haddock (same
|
||||||
|
div, no links on the actual titles
|
||||||
|
fix the page margins, and the table stuff: patches to the css?
|
||||||
|
|
||||||
release checklist:
|
release checklist:
|
||||||
hlint
|
hlint
|
||||||
|
@ -92,6 +97,8 @@ a collation in ansi sql is a optional qualifier plus identifier, not a
|
||||||
string
|
string
|
||||||
have to do fixity for this to work
|
have to do fixity for this to work
|
||||||
|
|
||||||
|
see what schema.fun(a) parses to and decide if this is correct
|
||||||
|
|
||||||
all ansi string literal syntax?
|
all ansi string literal syntax?
|
||||||
|
|
||||||
check ansi standard for operators (keywords and symbols)
|
check ansi standard for operators (keywords and symbols)
|
||||||
|
|
|
@ -138,7 +138,7 @@ These are a few misc tests which don't fit anywhere else.
|
||||||
> {qeSelectList = [(Nothing,Iden "a")]
|
> {qeSelectList = [(Nothing,Iden "a")]
|
||||||
> ,qeFrom = [TRSimple "t"]
|
> ,qeFrom = [TRSimple "t"]
|
||||||
> ,qeOffset = o
|
> ,qeOffset = o
|
||||||
> ,qeFetch = l}
|
> ,qeFetchFirst = l}
|
||||||
|
|
||||||
> combos :: TestItem
|
> combos :: TestItem
|
||||||
> combos = Group "combos" $ map (uncurry TestQueryExpr)
|
> combos = Group "combos" $ map (uncurry TestQueryExpr)
|
||||||
|
|
Loading…
Reference in a new issue