postgresql-simple-0.0.3: Mid-Level PostgreSQL client library

Portabilityportable
Stabilityexperimental
MaintainerLeon P Smith <leon@melding-monads.com>

Database.PostgreSQL.Simple.Param

Description

The Param typeclass, for rendering a parameter to a SQL query.

Synopsis

Documentation

data Action Source

How to render an element when substituting it into a query.

Constructors

Plain Builder

Render without escaping or quoting. Use for non-text types such as numbers, when you are certain that they will not introduce formatting vulnerabilities via use of characters such as spaces or "'".

Escape ByteString

Escape and enclose in quotes before substituting. Use for all text-like types, and anything else that may contain unsafe characters when rendered.

Many [Action]

Concatenate a series of rendering actions.

class Param a whereSource

A type that may be used as a single parameter to a SQL query.

Methods

render :: a -> ActionSource

Prepare a value for substitution into a query string.

inQuotes :: Builder -> BuilderSource

Surround a string with single-quote characters: "'"

This function does not perform any other escaping.