| Copyright | (c) 2011 MailRank Inc. |
|---|---|
| License | BSD3 |
| Maintainer | Paul Rouse <[email protected]> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Database.MySQL.Simple.Param
Description
The Param typeclass, for rendering a parameter to a SQL query.
Documentation
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 ToField a where Source #
A type that can be converted to a ByteString for use as a parameter
to an SQL query.
Any type which is an instance of this class can use the default
implementation of Param, which will wrap encodings with Escape.
Since: 0.4.8
Methods
toField :: a -> ByteString Source #
A type that may be used as a single parameter to a SQL query.
A default implementation is provided for any type which is an instance
of ToField, providing a simple mechanism for user-defined encoding
to text- or blob-like fields (including JSON).
Minimal complete definition
Nothing
Instances
| Param Int16 Source # | |
| Param Int32 Source # | |
| Param Int64 Source # | |
| Param Int8 Source # | |
| Param Word16 Source # | |
| Param Word32 Source # | |
| Param Word64 Source # | |
| Param ByteString Source # | |
Defined in Database.MySQL.Simple.Param Methods render :: ByteString -> Action Source # | |
| Param ByteString Source # | |
Defined in Database.MySQL.Simple.Param Methods render :: ByteString -> Action Source # | |
| Param Action Source # | |
| Param Null Source # | |
| Param Text Source # | |
| Param Text Source # | |
| Param Day Source # | |
| Param UTCTime Source # | |
| Param TimeOfDay Source # | |
| Param Word8 Source # | |
| Param Integer Source # | |
| Param Bool Source # | |
| Param Double Source # | |
| Param Float Source # | |
| Param Int Source # | |
| Param Word Source # | |
| Param (Binary ByteString) Source # | |
Defined in Database.MySQL.Simple.Param | |
| Param (Binary ByteString) Source # | |
Defined in Database.MySQL.Simple.Param | |
| Param a => Param (In (Set a)) Source # | |
| Param a => Param (In [a]) Source # | |
| Param a => Param (VaArgs [a]) Source # | |
| Param a => Param (Maybe a) Source # | |
| Param [Char] Source # | |