txt-sushi-0.3.0: Spreadsheets are databases!

Portabilityportable
Stabilityexperimental
Maintainerkeithshep@gmail.com

Database.TxtSushi.SQLParser

Description

Module for parsing SQL

Synopsis

Documentation

allMaybeTableNames :: Maybe TableExpression -> [String]Source

convenience function for extracting all of the table names used by the given table expression

parseSelectStatement :: GenParser Char st SelectStatementSource

Parses a SQL select statement

data SelectStatement Source

represents a select statement TODO this should be moved inside the TableExpression type

prettyFormatColumn :: ColumnIdentifier -> StringSource

I wanted to leave the default Show, but I also wanted a pretty print, so here it is!

withTrailing :: Monad m => m a1 -> m a -> m aSource

withoutTrailing :: Show a1 => GenParser tok st a1 -> GenParser tok st a -> GenParser tok st aSource

isAggregate :: SQLFunction -> BoolSource

an aggregate function is one whose min function count is 1 and whose arg count is not fixed

maybeReadInt :: String -> Maybe IntSource

returns an int if it can be read from the string

maybeReadReal :: String -> Maybe DoubleSource

returns a real if it can be read from the string