| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | keithshep@gmail.com |
| Safe Haskell | None |
Database.TxtSushi.SQLParser
Description
Module for parsing SQL
- parseSelectStatement :: GenParser Char st SelectStatement
- allMaybeTableNames :: Maybe TableExpression -> [String]
- data SelectStatement = SelectStatement {}
- data TableExpression
- = TableIdentifier { }
- | InnerJoin { }
- | OuterJoin { }
- | CrossJoin { }
- | SelectExpression { }
- data ColumnIdentifier = ColumnIdentifier {}
- data ColumnSelection
- = AllColumns
- | AllColumnsFrom { }
- | ExpressionColumn { }
- | ExpressionColumnRange { }
- data Expression
- = FunctionExpression { }
- | ColumnExpression { }
- | StringConstantExpression { }
- | IntConstantExpression { }
- | RealConstantExpression { }
- | BoolConstantExpression { }
- data SQLFunction = SQLFunction {}
- data OrderByItem = OrderByItem {}
Documentation
parseSelectStatement :: GenParser Char st SelectStatementSource
Parses a SQL select statement
allMaybeTableNames :: Maybe TableExpression -> [String]Source
convenience function for extracting all of the table names used by the given table expression
data SelectStatement Source
represents a select statement TODO this should be moved inside the TableExpression type
Constructors
| SelectStatement | |
Fields | |
data TableExpression Source
Constructors
| TableIdentifier | |
Fields | |
| InnerJoin | |
Fields | |
| OuterJoin | |
Fields | |
| CrossJoin | |
Fields | |
| SelectExpression | |
Fields | |
data ColumnIdentifier Source
Constructors
| ColumnIdentifier | |
Fields
| |
Instances
data ColumnSelection Source
Constructors
| AllColumns | |
| AllColumnsFrom | |
Fields | |
| ExpressionColumn | |
Fields | |
| ExpressionColumnRange | |
Fields | |
data Expression Source
Constructors
| FunctionExpression | |
Fields | |
| ColumnExpression | |
Fields | |
| StringConstantExpression | |
Fields | |
| IntConstantExpression | |
Fields | |
| RealConstantExpression | |
Fields | |
| BoolConstantExpression | |
Fields | |
data SQLFunction Source
Constructors
| SQLFunction | |
Fields | |
data OrderByItem Source
Constructors
| OrderByItem | |
Fields | |