Safe Haskell | None |
---|---|
Language | Haskell2010 |
Convert the simple AST to an SQL query, ready to be passed to the mysql package's query/exec functions.
Synopsis
- newtype Query = Query {}
- data Printer
- (<+>) :: Printer -> Printer -> Printer
- fromExpression :: Expression -> Printer
- fromScalarType :: ScalarValue -> Query
- fromOp :: Op -> Printer
- fromFieldName :: FieldName -> Printer
- fromSelect :: Select -> Printer
- fromOffsetAndLimit :: Top -> Maybe Int -> Printer
- fromOrderBys :: Maybe (NonEmpty OrderBy) -> Printer
- fromOrderBy :: OrderBy -> [Printer]
- fromOrder :: Order -> Printer
- fromNullsOrder :: FieldName -> NullsOrder -> Printer
- fromProjection :: Projection -> Printer
- fromAggregate :: Aggregate -> Printer
- fromCountable :: Countable FieldName -> Printer
- fromWhere :: Where -> Printer
- fromFrom :: From -> Printer
- parens :: Printer -> Printer
- fromTableName :: TableName -> Printer
- fromAliased :: Aliased Printer -> Printer
- fromNameText :: Text -> Printer
- truePrinter :: Printer
- falsePrinter :: Printer
- toQueryFlat :: Printer -> Query
- toQueryPretty :: Printer -> Query
- renderBuilderPretty :: Printer -> (Builder, InsOrdHashMap Int ScalarValue)
- runBuilderPretty :: Printer -> State (InsOrdHashMap ScalarValue Int) Builder
- fromFieldOrigin :: FieldOrigin -> Printer
- fromNullAggregate :: Aggregate -> Printer
Documentation
SeqPrinter [Printer] | |
SepByPrinter Printer [Printer] | |
NewlinePrinter | |
QueryPrinter Query | |
IndentPrinter Int Printer |
fromExpression :: Expression -> Printer Source #
fromScalarType :: ScalarValue -> Query Source #
fromFieldName :: FieldName -> Printer Source #
fromSelect :: Select -> Printer Source #
fromOrderBy :: OrderBy -> [Printer] Source #
fromNullsOrder :: FieldName -> NullsOrder -> Printer Source #
fromProjection :: Projection -> Printer Source #
fromAggregate :: Aggregate -> Printer Source #
fromTableName :: TableName -> Printer Source #
fromNameText :: Text -> Printer Source #
toQueryFlat :: Printer -> Query Source #
toQueryPretty :: Printer -> Query Source #
renderBuilderPretty :: Printer -> (Builder, InsOrdHashMap Int ScalarValue) Source #
Produces a query with holes, and a mapping for each
runBuilderPretty :: Printer -> State (InsOrdHashMap ScalarValue Int) Builder Source #
fromFieldOrigin :: FieldOrigin -> Printer Source #
fromNullAggregate :: Aggregate -> Printer Source #