Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- class QueryLike a where
- class QueryKeyLike a where
- class QueryValueLike a where
Documentation
class QueryLike a where Source #
Types which can, and commonly are, converted to Query
are in this class.
You can use lists of simple key value pairs, with ByteString
(strict, or lazy:
ByteString
), Text
, or String
as the key/value types. You can also have the value
type lifted into a Maybe to support keys without values; and finally it is possible to put
each pair into a Maybe for key-value pairs that aren't always present.
(QueryKeyLike k, QueryValueLike v) => QueryLike [Maybe (k, v)] Source # | |
(QueryKeyLike k, QueryValueLike v) => QueryLike [(k, v)] Source # | |
class QueryKeyLike a where Source #
Types which, in a Query-like key-value list, are used in the Key position.
toQueryKey :: a -> ByteString Source #
class QueryValueLike a where Source #
Types which, in a Query-like key-value list, are used in the Value position.
toQueryValue :: a -> Maybe ByteString Source #