1
Fork 0

start refactoring the dialect support, and work on the keyword handling

This commit is contained in:
Jake Wheat 2019-08-31 11:57:28 +01:00
parent 3707a09cb8
commit eb45eb8705
10 changed files with 379 additions and 382 deletions
tools/Language/SQL/SimpleSQL

View file

@ -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]