| Copyright | (c) 2013 Leon P Smith |
|---|---|
| License | BSD3 |
| Maintainer | Leon P Smith <leon@melding-monads.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell98 |
Database.PostgreSQL.Simple.HStore
Description
Parsers and printers for hstore, a extended type bundled with PostgreSQL providing finite maps from text strings to text strings. See https://www.postgresql.org/docs/9.5/static/hstore.html for more information.
Note that in order to use this type, a database superuser must
install it by running a sql script in the share directory. This
can be done on PostgreSQL 9.1 and later with the command
CREATE EXTENSION hstore. See
https://www.postgresql.org/docs/9.5/static/contrib.html for more
information.
- newtype HStoreList = HStoreList {
- fromHStoreList :: [(Text, Text)]
- newtype HStoreMap = HStoreMap {
- fromHStoreMap :: Map Text Text
- class ToHStore a where
- data HStoreBuilder
- toBuilder :: HStoreBuilder -> Builder
- toLazyByteString :: HStoreBuilder -> ByteString
- hstore :: (ToHStoreText a, ToHStoreText b) => a -> b -> HStoreBuilder
- parseHStoreList :: ByteString -> Either String HStoreList
- class ToHStoreText a where
- data HStoreText
Documentation
newtype HStoreList Source #
Constructors
| HStoreList | |
Fields
| |
Instances
| Show HStoreList Source # | |
| FromField HStoreList Source # | hstore |
| ToField HStoreList Source # | |
| ToHStore HStoreList Source # | hstore |
Constructors
| HStoreMap | |
Fields
| |
class ToHStore a where Source #
Minimal complete definition
Methods
toHStore :: a -> HStoreBuilder Source #
toBuilder :: HStoreBuilder -> Builder Source #
hstore :: (ToHStoreText a, ToHStoreText b) => a -> b -> HStoreBuilder Source #
class ToHStoreText a where Source #
Minimal complete definition
Methods
toHStoreText :: a -> HStoreText Source #
Instances
| ToHStoreText ByteString Source # | Assumed to be UTF-8 encoded |
| ToHStoreText ByteString Source # | Assumed to be UTF-8 encoded |
| ToHStoreText Text Source # | |
| ToHStoreText Text Source # | |
| ToHStoreText HStoreText Source # | |
data HStoreText Source #
Represents escape text, ready to be the key or value to a hstore value
Instances