| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.SQL.SimpleSQL.Parse
Description
This is the module with the parser functions.
Synopsis
- parseQueryExpr :: Dialect -> Text -> Maybe (Int, Int) -> Text -> Either ParseError QueryExpr
- parseScalarExpr :: Dialect -> Text -> Maybe (Int, Int) -> Text -> Either ParseError ScalarExpr
- parseStatement :: Dialect -> Text -> Maybe (Int, Int) -> Text -> Either ParseError Statement
- parseStatements :: Dialect -> Text -> Maybe (Int, Int) -> Text -> Either ParseError [Statement]
- data ParseError
- prettyError :: ParseError -> Text
- ansi2011 :: Dialect
Documentation
Arguments
| :: Dialect | dialect of SQL to use |
| -> Text | filename to use in error messages |
| -> Maybe (Int, Int) | line number and column number of the first character in the source to use in error messages |
| -> Text | the SQL source to parse |
| -> Either ParseError QueryExpr |
Parses a query expr, trailing semicolon optional.
Arguments
| :: Dialect | dialect of SQL to use |
| -> Text | filename to use in error messages |
| -> Maybe (Int, Int) | line number and column number of the first character in the source to use in error messages |
| -> Text | the SQL source to parse |
| -> Either ParseError ScalarExpr |
Parses a scalar expression.
Arguments
| :: Dialect | dialect of SQL to use |
| -> Text | filename to use in error messages |
| -> Maybe (Int, Int) | line number and column number of the first character in the source to use in error messages |
| -> Text | the SQL source to parse |
| -> Either ParseError Statement |
Parses a statement, trailing semicolon optional.
Arguments
| :: Dialect | dialect of SQL to use |
| -> Text | filename to use in error messages |
| -> Maybe (Int, Int) | line number and column number of the first character in the source to use in error messages |
| -> Text | the SQL source to parse |
| -> Either ParseError [Statement] |
Parses a list of statements, with semi colons between them. The final semicolon is optional.
data ParseError Source #
Constructors
| LexError ParseError | |
| ParseError (ParseErrorBundle SQLStream Void) |
prettyError :: ParseError -> Text Source #