git.iko.soy/typeable/postgresql-simple
on master help sign in
Merge pull request #86 from basvandijk/selector-functions
c40fa72Leon P Smith
src/Database/PostgreSQL/Simple/HStore/Implementation.hs+2−2
@@ -112,7 +112,7 @@ instance ToField HStoreBuilder where
112 toField Empty = toField (BS.empty)
112 toField Empty = toField (BS.empty)
113 toField (Comma x) = toField (Blaze.toLazyByteString x)
113 toField (Comma x) = toField (Blaze.toLazyByteString x)
114
114
115−newtype HStoreList = HStoreList [(Text,Text)] deriving (Typeable, Show)
115+newtype HStoreList = HStoreList {fromHStoreList :: [(Text,Text)]} deriving (Typeable, Show)
116
116
117-- | hstore
117-- | hstore
118instance ToHStore HStoreList where
118instance ToHStore HStoreList where
@@ -139,7 +139,7 @@ instance FromField HStoreList where
139 Right (Right val) ->
139 Right (Right val) ->
140 return val
140 return val
141
141
142−newtype HStoreMap = HStoreMap (Map Text Text) deriving (Eq, Ord, Typeable, Show)
142+newtype HStoreMap = HStoreMap {fromHStoreMap :: Map Text Text} deriving (Eq, Ord, Typeable, Show)
143
143
144instance ToHStore HStoreMap where
144instance ToHStore HStoreMap where
145 toHStore (HStoreMap xs) = Map.foldrWithKey f mempty xs
145 toHStore (HStoreMap xs) = Map.foldrWithKey f mempty xs
src/Database/PostgreSQL/Simple/Types.hs+1−1
@@ -109,7 +109,7 @@ newtype In a = In a
109 deriving (Eq, Ord, Read, Show, Typeable, Functor)
109 deriving (Eq, Ord, Read, Show, Typeable, Functor)
110
110
111-- | Wrap binary data for use as a @bytea@ value.
111-- | Wrap binary data for use as a @bytea@ value.
112−newtype Binary a = Binary a
112+newtype Binary a = Binary {fromBinary :: a}
113 deriving (Eq, Ord, Read, Show, Typeable, Functor)
113 deriving (Eq, Ord, Read, Show, Typeable, Functor)
114
114
115-- | A composite type to parse your custom data structures without
115-- | A composite type to parse your custom data structures without