squeal-postgresql-0.3.1.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 #

Concatenate two ByteStrings with a space between.

commaSeparated :: [ByteString] -> ByteString #

Comma separate a list of ByteStrings.

doubleQuoted :: ByteString -> ByteString #

Add double quotes around a ByteString.

renderCommaSeparated :: SListI xs => (forall x. expression x -> ByteString) -> NP expression xs -> ByteString #

Comma separate the renderings of a heterogeneous list.

renderCommaSeparatedMaybe :: SListI xs => (forall x. expression x -> Maybe ByteString) -> NP expression xs -> ByteString #

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

renderNat :: KnownNat n => proxy n -> ByteString #

Render a promoted Nat.

class RenderSQL sql where #

A class for rendering SQL

Minimal complete definition

renderSQL

Methods

renderSQL :: sql -> ByteString #

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

Defined in Squeal.PostgreSQL.Schema

Methods

renderSQL :: Alias alias -> ByteString #

RenderSQL (Definition schema0 schema1) # 
Instance details

Defined in Squeal.PostgreSQL.Definition

Methods

renderSQL :: Definition schema0 schema1 -> ByteString #

RenderSQL (Query schema params columns) # 
Instance details

Defined in Squeal.PostgreSQL.Query

Methods

renderSQL :: Query schema params columns -> ByteString #

RenderSQL (Manipulation schema params columns) # 
Instance details

Defined in Squeal.PostgreSQL.Manipulation

Methods

renderSQL :: Manipulation schema params columns -> ByteString #

RenderSQL (Expression schema relations grouping params ty) # 
Instance details

Defined in Squeal.PostgreSQL.Expression

Methods

renderSQL :: Expression schema relations grouping params ty -> ByteString #

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

Print SQL.