start refactoring the dialect support, and work on the keyword handling
This commit is contained in:
parent
3707a09cb8
commit
eb45eb8705
10 changed files with 379 additions and 382 deletions
tools/Language/SQL/SimpleSQL
|
@ -315,7 +315,7 @@ the + or -.
|
|||
|
||||
> odbcLexerTests :: TestItem
|
||||
> odbcLexerTests = Group "odbcLexTests" $
|
||||
> [ LexTest sqlserver {allowOdbc = True} s t | (s,t) <-
|
||||
> [ LexTest sqlserver {diOdbc = True} s t | (s,t) <-
|
||||
> [("{}", [Symbol "{", Symbol "}"])
|
||||
> ]]
|
||||
> ++ [LexFails sqlserver "{"
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
> ,iden "SQL_DATE"])
|
||||
> ]
|
||||
> ,Group "outer join" [
|
||||
> TestQueryExpr ansi2011 {allowOdbc=True}
|
||||
> TestQueryExpr ansi2011 {diOdbc=True}
|
||||
> "select * from {oj t1 left outer join t2 on expr}"
|
||||
> $ makeSelect
|
||||
> {qeSelectList = [(Star,Nothing)]
|
||||
> ,qeFrom = [TROdbc $ TRJoin (TRSimple [Name Nothing "t1"]) False JLeft (TRSimple [Name Nothing "t2"])
|
||||
> (Just $ JoinOn $ Iden [Name Nothing "expr"])]}]
|
||||
> ,Group "check parsing bugs" [
|
||||
> TestQueryExpr ansi2011 {allowOdbc=True}
|
||||
> TestQueryExpr ansi2011 {diOdbc=True}
|
||||
> "select {fn CONVERT(cint,SQL_BIGINT)} from t;"
|
||||
> $ makeSelect
|
||||
> {qeSelectList = [(OdbcFunc (ap "CONVERT"
|
||||
|
@ -45,7 +45,7 @@
|
|||
> ,qeFrom = [TRSimple [Name Nothing "t"]]}]
|
||||
> ]
|
||||
> where
|
||||
> e = TestScalarExpr ansi2011 {allowOdbc = True}
|
||||
> e = TestScalarExpr ansi2011 {diOdbc = True}
|
||||
> --tsql = ParseProcSql defaultParseFlags {pfDialect=sqlServerDialect}
|
||||
> ap n = App [Name Nothing n]
|
||||
> iden n = Iden [Name Nothing n]
|
||||
|
|
|
@ -5,7 +5,7 @@ Tests.lhs module for the 'interpreter'.
|
|||
> module Language.SQL.SimpleSQL.TestTypes
|
||||
> (TestItem(..)
|
||||
> ,ansi2011,mysql,postgres,oracle,sqlserver
|
||||
> ,allowOdbc) where
|
||||
> ,diOdbc) where
|
||||
|
||||
> import Language.SQL.SimpleSQL.Syntax
|
||||
> import Language.SQL.SimpleSQL.Lex (Token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue