pg-store-0.2: Simple storage interface to PostgreSQL

Copyright(c) Ole Krüger 2016
LicenseBSD3
MaintainerOle Krüger <ole@vprsm.de>
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Store.Query.Builder

Contents

Description

 

Synopsis

Query Builder

type QueryBuilder = State BuilderState () Source #

Query builder

insertCode :: ByteString -> QueryBuilder Source #

Insert a piece of SQL.

insertTypedValue :: TypedValue -> QueryBuilder Source #

Insert a parameter placeholder into the code and attach the typed value to the query.

insertValue' :: ByteString -> Value -> QueryBuilder Source #

Extension of insertValue which will add a type hint to the parameter placeholder.

insertQuote :: ByteString -> QueryBuilder Source #

Insert a quote into the code.

insertName :: ByteString -> QueryBuilder Source #

Insert a name into the code. It will be surrounded by double quotes if necessary.

insertCommaSeperated :: [QueryBuilder] -> QueryBuilder Source #

Join several builders into a comma-seperated list.

Generalized Building