squeal-postgresql-0.4.0.0: Squeal PostgreSQL Library

Copyright(c) Eitan Chatav 2017
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Squeal.PostgreSQL.Render

Contents

Description

Rendering helper functions.

Synopsis

Render

(<+>) :: ByteString -> ByteString -> ByteString infixr 7 Source #

Concatenate two ByteStrings with a space between.

commaSeparated :: [ByteString] -> ByteString Source #

Comma separate a list of ByteStrings.

doubleQuoted :: ByteString -> ByteString Source #

Add double quotes around a ByteString.

singleQuotedText :: Text -> ByteString Source #

Add single quotes around a Text and escape single quotes within it.

singleQuotedUtf8 :: ByteString -> ByteString Source #

Add single quotes around a ByteString and escape single quotes within it.

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 #

Comma separate the Maybe renderings of a heterogeneous list, dropping Nothings.

renderNat :: forall n. KnownNat n => ByteString Source #

Render a promoted Nat.

renderSymbol :: forall s. KnownSymbol s => ByteString Source #

Render a promoted Symbol.

class RenderSQL sql where Source #

A class for rendering SQL

Minimal complete definition

renderSQL

Methods

renderSQL :: sql -> ByteString Source #

Instances
KnownSymbol alias => RenderSQL (Alias alias) Source # 
Instance details

Defined in Squeal.PostgreSQL.Schema

Methods

renderSQL :: Alias alias -> ByteString Source #

RenderSQL (Definition schema0 schema1) Source # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

renderSQL :: Definition schema0 schema1 -> ByteString Source #

RenderSQL (Query schema params columns) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query

Methods

renderSQL :: Query schema params columns -> ByteString Source #

RenderSQL (Manipulation schema params columns) Source # 
Instance details

Defined in Squeal.PostgreSQL.Manipulation

Methods

renderSQL :: Manipulation schema params columns -> ByteString Source #

RenderSQL (Expression schema from grouping params ty) Source # 
Instance details

Defined in Squeal.PostgreSQL.Expression

Methods

renderSQL :: Expression schema from grouping params ty -> ByteString Source #

printSQL :: (RenderSQL sql, MonadBase IO io) => sql -> io () Source #

Print SQL.