simple-sql-parser-0.4.1: A parser for SQL queries

Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.SQL.SimpleSQL.Parser

Description

This is the module with the parser functions.

Synopsis

Documentation

parseQueryExpr Source

Arguments

:: 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.

parseValueExpr Source

Arguments

:: 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 ValueExpr 

Parses a value expression.

parseQueryExprs Source

Arguments

:: 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 list of query expressions, with semi colons between them. The final semicolon is optional.

data ParseError Source

Type to represent parse errors.

Constructors

ParseError 

Fields

peErrorString :: String

contains the error message

peFilename :: FilePath

filename location for the error

pePosition :: (Int, Int)

line number and column number location for the error

peFormattedError :: String

formatted error with the position, error message and source context