Copyright | (c) 2013 Leon P Smith |
---|---|
License | BSD3 |
Maintainer | Leon P Smith <leon@melding-monads.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
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.
Synopsis
- newtype HStoreList = HStoreList {
- fromHStoreList :: [(Text, Text)]
- newtype HStoreMap = HStoreMap {
- fromHStoreMap :: Map Text Text
- class ToHStore a where
- toHStore :: a -> HStoreBuilder
- 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
- toHStoreText :: a -> HStoreText
- data HStoreText
Documentation
newtype HStoreList Source #
HStoreList | |
|
Instances
Show HStoreList Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation showsPrec :: Int -> HStoreList -> ShowS # show :: HStoreList -> String # showList :: [HStoreList] -> ShowS # | |
ToField HStoreList Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toField :: HStoreList -> Action Source # | |
FromField HStoreList Source # | hstore |
ToHStore HStoreList Source # | hstore |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStore :: HStoreList -> HStoreBuilder Source # |
class ToHStore a where Source #
toHStore :: a -> HStoreBuilder Source #
Instances
ToHStore HStoreMap Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStore :: HStoreMap -> HStoreBuilder Source # | |
ToHStore HStoreList Source # | hstore |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStore :: HStoreList -> HStoreBuilder Source # | |
ToHStore HStoreBuilder Source # | |
data HStoreBuilder Source #
Represents valid hstore syntax.
Instances
Semigroup HStoreBuilder Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation (<>) :: HStoreBuilder -> HStoreBuilder -> HStoreBuilder # sconcat :: NonEmpty HStoreBuilder -> HStoreBuilder # stimes :: Integral b => b -> HStoreBuilder -> HStoreBuilder # | |
Monoid HStoreBuilder Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation mempty :: HStoreBuilder # mappend :: HStoreBuilder -> HStoreBuilder -> HStoreBuilder # mconcat :: [HStoreBuilder] -> HStoreBuilder # | |
ToField HStoreBuilder Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toField :: HStoreBuilder -> Action Source # | |
ToHStore HStoreBuilder Source # | |
toBuilder :: HStoreBuilder -> Builder Source #
hstore :: (ToHStoreText a, ToHStoreText b) => a -> b -> HStoreBuilder Source #
class ToHStoreText a where Source #
toHStoreText :: a -> HStoreText Source #
Instances
ToHStoreText ByteString Source # | Assumed to be UTF-8 encoded |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: ByteString -> HStoreText Source # | |
ToHStoreText ByteString Source # | Assumed to be UTF-8 encoded |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: ByteString -> HStoreText Source # | |
ToHStoreText Text Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: Text -> HStoreText Source # | |
ToHStoreText Text Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: Text -> HStoreText Source # | |
ToHStoreText HStoreText Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: HStoreText -> HStoreText Source # |
data HStoreText Source #
Represents escape text, ready to be the key or value to a hstore value
Instances
Semigroup HStoreText Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation (<>) :: HStoreText -> HStoreText -> HStoreText # sconcat :: NonEmpty HStoreText -> HStoreText # stimes :: Integral b => b -> HStoreText -> HStoreText # | |
Monoid HStoreText Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation mempty :: HStoreText # mappend :: HStoreText -> HStoreText -> HStoreText # mconcat :: [HStoreText] -> HStoreText # | |
ToHStoreText HStoreText Source # | |
Defined in Database.PostgreSQL.Simple.HStore.Implementation toHStoreText :: HStoreText -> HStoreText Source # |