example of a custom dialect which allows date('xxx') syntax by removing 'date' from the list of keywords
This commit is contained in:
parent
206982cd0a
commit
1a1913e7b8
4 changed files with 18 additions and 3 deletions
tools/Language/SQL/SimpleSQL
11
tools/Language/SQL/SimpleSQL/CustomDialect.lhs
Normal file
11
tools/Language/SQL/SimpleSQL/CustomDialect.lhs
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
> module Language.SQL.SimpleSQL.CustomDialect (customDialectTests) where
|
||||
|
||||
> import Language.SQL.SimpleSQL.TestTypes
|
||||
|
||||
> customDialectTests :: TestItem
|
||||
> customDialectTests = Group "custom dialect tests" (map (ParseQueryExpr myDialect) sometests
|
||||
> ++ [ParseScalarExprFails ansi2011 "SELECT DATE('2000-01-01')"])
|
||||
> where
|
||||
> myDialect = ansi2011 {diKeywords = filter (/="date") (diKeywords ansi2011)}
|
||||
> sometests = ["SELECT DATE('2000-01-01')"]
|
Loading…
Add table
Add a link
Reference in a new issue