Stability | experimental |
---|---|
Maintainer | Leon P Smith <[email protected]> |
Safe Haskell | None |
Database.PostgreSQL.Simple.ToField
Description
The ToField
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. |
EscapeByteA ByteString | Escape binary data for use as a |
EscapeIdentifier ByteString | Escape before substituting. Use for all sql identifiers like
table, column names, etc. This is used by the |
Many [Action] | Concatenate a series of rendering actions. |
A type that may be used as a single parameter to a SQL query.
Instances
ToField Bool | |
ToField Double | |
ToField Float | |
ToField Int | |
ToField Int8 | |
ToField Int16 | |
ToField Int32 | |
ToField Int64 | |
ToField Integer | |
ToField Word | |
ToField Word8 | |
ToField Word16 | |
ToField Word32 | |
ToField Word64 | |
ToField ByteString | |
ToField ByteString | |
ToField Scientific | |
ToField Text | |
ToField UTCTime | |
ToField Value | |
ToField Text | |
ToField Oid | |
ToField UUID | |
ToField TimeOfDay | |
ToField ZonedTime | |
ToField LocalTime | |
ToField Day | |
ToField Date | |
ToField ZonedTimestamp | |
ToField UTCTimestamp | |
ToField LocalTimestamp | |
ToField QualifiedIdentifier | |
ToField Identifier | |
ToField Default | |
ToField Null | |
ToField Action | |
ToField HStoreMap | |
ToField HStoreList | |
ToField HStoreBuilder | |
ToField [Char] | |
ToField a => ToField (Maybe a) | |
ToField a => ToField (Vector a) | |
ToRow a => ToField (Values a) | |
ToField a => ToField (PGArray a) | |
ToField (Binary ByteString) | |
ToField (Binary ByteString) | |
ToField a => ToField (In [a]) |
toJSONField :: ToJSON a => a -> ActionSource