mysql-simple-0.4.5: A mid-level MySQL client library.

Copyright(c) 2011 MailRank Inc.
LicenseBSD3
MaintainerPaul Rouse <pyr@doynton.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Database.MySQL.Simple.Param

Description

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

Synopsis

Documentation

data Action #

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.

Instances
Show Action # 
Instance details

Defined in Database.MySQL.Simple.Param

Param Action # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Action -> Action #

class Param a where #

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

Methods

render :: a -> Action #

Prepare a value for substitution into a query string.

Instances
Param Bool # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Bool -> Action #

Param Double # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Double -> Action #

Param Float # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Float -> Action #

Param Int # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Int -> Action #

Param Int8 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Int8 -> Action #

Param Int16 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Int16 -> Action #

Param Int32 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Int32 -> Action #

Param Int64 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Int64 -> Action #

Param Integer # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Integer -> Action #

Param Word # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Word -> Action #

Param Word8 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Word8 -> Action #

Param Word16 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Word16 -> Action #

Param Word32 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Word32 -> Action #

Param Word64 # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Word64 -> Action #

Param ByteString # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: ByteString -> Action #

Param ByteString # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: ByteString -> Action #

Param Text # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Text -> Action #

Param Text # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Text -> Action #

Param TimeOfDay # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: TimeOfDay -> Action #

Param UTCTime # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: UTCTime -> Action #

Param Day # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Day -> Action #

Param Null # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Null -> Action #

Param Action # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Action -> Action #

Param [Char] # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: [Char] -> Action #

Param a => Param (Maybe a) # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: Maybe a -> Action #

Param (Binary ByteString) # 
Instance details

Defined in Database.MySQL.Simple.Param

Param (Binary ByteString) # 
Instance details

Defined in Database.MySQL.Simple.Param

Param a => Param (VaArgs [a]) # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: VaArgs [a] -> Action #

Param a => Param (In [a]) # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: In [a] -> Action #

Param a => Param (In (Set a)) # 
Instance details

Defined in Database.MySQL.Simple.Param

Methods

render :: In (Set a) -> Action #

inQuotes :: Builder -> Builder #

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

This function does not perform any other escaping.