Copyright | (c) Eitan Chatav 2017 |
---|---|
Maintainer | [email protected] |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Squeal.PostgreSQL.Render
Contents
Description
Rendering helper functions.
Synopsis
- parenthesized :: ByteString -> ByteString
- (<+>) :: ByteString -> ByteString -> ByteString
- commaSeparated :: [ByteString] -> ByteString
- doubleQuoted :: ByteString -> ByteString
- renderCommaSeparated :: SListI xs => (forall x. expression x -> ByteString) -> NP expression xs -> ByteString
- renderCommaSeparatedMaybe :: SListI xs => (forall x. expression x -> Maybe ByteString) -> NP expression xs -> ByteString
- renderNat :: KnownNat n => proxy n -> ByteString
- class RenderSQL sql where
- printSQL :: (RenderSQL sql, MonadBase IO io) => sql -> io ()
Render
parenthesized :: ByteString -> ByteString Source #
Parenthesize a ByteString
.
(<+>) :: ByteString -> ByteString -> ByteString Source #
Concatenate two ByteString
s with a space between.
commaSeparated :: [ByteString] -> ByteString Source #
Comma separate a list of ByteString
s.
doubleQuoted :: ByteString -> ByteString Source #
Add double quotes around a ByteString
.
renderCommaSeparated :: SListI xs => (forall x. expression x -> ByteString) -> NP expression xs -> ByteString Source #
Comma separate the renderings of a heterogeneous list.
renderCommaSeparatedMaybe :: SListI xs => (forall x. expression x -> Maybe ByteString) -> NP expression xs -> ByteString Source #
class RenderSQL sql where Source #
A class for rendering SQL
Minimal complete definition
Methods
renderSQL :: sql -> ByteString Source #
Instances
KnownSymbol alias => RenderSQL (Alias alias) Source # | |
Defined in Squeal.PostgreSQL.Schema Methods renderSQL :: Alias alias -> ByteString Source # | |
RenderSQL (Definition schema0 schema1) Source # | |
Defined in Squeal.PostgreSQL.Definition Methods renderSQL :: Definition schema0 schema1 -> ByteString Source # | |
RenderSQL (Query schema params columns) Source # | |
Defined in Squeal.PostgreSQL.Query Methods renderSQL :: Query schema params columns -> ByteString Source # | |
RenderSQL (Manipulation schema params columns) Source # | |
Defined in Squeal.PostgreSQL.Manipulation Methods renderSQL :: Manipulation schema params columns -> ByteString Source # | |
RenderSQL (Expression schema relations grouping params ty) Source # | |
Defined in Squeal.PostgreSQL.Expression Methods renderSQL :: Expression schema relations grouping params ty -> ByteString Source # |