Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This is the module with the parser functions.
Synopsis
- parseQueryExpr :: Dialect -> FilePath -> Maybe (Int, Int) -> String -> Either ParseError QueryExpr
- parseScalarExpr :: Dialect -> FilePath -> Maybe (Int, Int) -> String -> Either ParseError ScalarExpr
- parseStatement :: Dialect -> FilePath -> Maybe (Int, Int) -> String -> Either ParseError Statement
- parseStatements :: Dialect -> FilePath -> Maybe (Int, Int) -> String -> Either ParseError [Statement]
- data ParseError = ParseError {
- peErrorString :: String
- peFilename :: FilePath
- pePosition :: (Int, Int)
- peFormattedError :: String
Documentation
:: Dialect | dialect of SQL to use |
-> FilePath | 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 |
-> String | the SQL source to parse |
-> Either ParseError QueryExpr |
Parses a query expr, trailing semicolon optional.
:: Dialect | dialect of SQL to use |
-> FilePath | 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 |
-> String | the SQL source to parse |
-> Either ParseError ScalarExpr |
Parses a scalar expression.
:: Dialect | dialect of SQL to use |
-> FilePath | 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 |
-> String | the SQL source to parse |
-> Either ParseError Statement |
Parses a statement, trailing semicolon optional.
:: Dialect | dialect of SQL to use |
-> FilePath | 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 |
-> String | 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 #
Type to represent parse errors.
ParseError | |
|
Instances
Eq ParseError Source # | |
Defined in Language.SQL.SimpleSQL.Errors (==) :: ParseError -> ParseError -> Bool # (/=) :: ParseError -> ParseError -> Bool # | |
Show ParseError Source # | |
Defined in Language.SQL.SimpleSQL.Errors showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # |