remove old 2003 tests
add tests for sort specification
This commit is contained in:
parent
d4a7656bde
commit
8cabf5abcf
|
@ -63,7 +63,6 @@ Test-Suite Tests
|
|||
Language.SQL.SimpleSQL.Postgres,
|
||||
Language.SQL.SimpleSQL.QueryExprComponents,
|
||||
Language.SQL.SimpleSQL.QueryExprs,
|
||||
Language.SQL.SimpleSQL.SQL2003,
|
||||
Language.SQL.SimpleSQL.SQL2011,
|
||||
Language.SQL.SimpleSQL.TableRefs,
|
||||
Language.SQL.SimpleSQL.TestTypes,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4248,10 +4248,25 @@ Specify a sort order.
|
|||
> sortSpecificationList :: TestItem
|
||||
> sortSpecificationList = Group "sort specification list"
|
||||
> $ map (uncurry TestQueryExpr)
|
||||
> -- todo: finish test for sort specs
|
||||
> [{-("select * from t order by a,b", undefined)
|
||||
> ,("select * from t order by a asc", undefined)
|
||||
> ,("select * from t order by a desc", undefined)
|
||||
> ,("select * from t order by a nulls first", undefined)
|
||||
> ,("select * from t order by a nulls first", undefined)-}
|
||||
> [("select * from t order by a"
|
||||
> ,qe {qeOrderBy = [SortSpec (Iden [Name "a"]) DirDefault NullsOrderDefault]})
|
||||
> ,("select * from t order by a,b"
|
||||
> ,qe {qeOrderBy = [SortSpec (Iden [Name "a"]) DirDefault NullsOrderDefault
|
||||
> ,SortSpec (Iden [Name "b"]) DirDefault NullsOrderDefault]})
|
||||
> ,("select * from t order by a asc,b"
|
||||
> ,qe {qeOrderBy = [SortSpec (Iden [Name "a"]) Asc NullsOrderDefault
|
||||
> ,SortSpec (Iden [Name "b"]) DirDefault NullsOrderDefault]})
|
||||
> ,("select * from t order by a desc,b"
|
||||
> ,qe {qeOrderBy = [SortSpec (Iden [Name "a"]) Desc NullsOrderDefault
|
||||
> ,SortSpec (Iden [Name "b"]) DirDefault NullsOrderDefault]})
|
||||
> ,("select * from t order by a collate x desc,b"
|
||||
> ,qe {qeOrderBy = [SortSpec (Collate (Iden [Name "a"]) [Name "x"]) Desc NullsOrderDefault
|
||||
> ,SortSpec (Iden [Name "b"]) DirDefault NullsOrderDefault]})
|
||||
> ,("select * from t order by 1,2"
|
||||
> ,qe {qeOrderBy = [SortSpec (NumLit "1") DirDefault NullsOrderDefault
|
||||
> ,SortSpec (NumLit "2") DirDefault NullsOrderDefault]})
|
||||
> ]
|
||||
> where
|
||||
> qe = makeSelect
|
||||
> {qeSelectList = [(Star,Nothing)]
|
||||
> ,qeFrom = [TRSimple [Name "t"]]}
|
||||
|
|
|
@ -28,7 +28,6 @@ test data to the Test.Framework tests.
|
|||
> import Language.SQL.SimpleSQL.ValueExprs
|
||||
> import Language.SQL.SimpleSQL.Tpch
|
||||
|
||||
> import Language.SQL.SimpleSQL.SQL2003
|
||||
> import Language.SQL.SimpleSQL.SQL2011
|
||||
|
||||
Order the tests to start from the simplest first. This is also the
|
||||
|
@ -45,7 +44,6 @@ order on the generated documentation.
|
|||
> ,fullQueriesTests
|
||||
> ,postgresTests
|
||||
> ,tpchTests
|
||||
> ,sql2003Tests
|
||||
> ,sql2011Tests
|
||||
> ]
|
||||
|
||||
|
|
Loading…
Reference in a new issue