postgresql-simple 0.3.1.1 → 0.3.1.2
raw patch · 2 files changed
+6/−9 lines, 2 files
Files
postgresql-simple.cabal view
@@ -1,5 +1,5 @@ Name: postgresql-simple-Version: 0.3.1.1+Version: 0.3.1.2 Synopsis: Mid-Level PostgreSQL client library Description: Mid-Level PostgreSQL client library, forked from mysql-simple.@@ -75,7 +75,7 @@ source-repository this type: git location: http://github.com/lpsmith/postgresql-simple- tag: v0.3.1.1+ tag: v0.3.1.2 test-suite test type: exitcode-stdio-1.0
src/Database/PostgreSQL/Simple/HStore/Implementation.hs view
@@ -152,13 +152,10 @@ where convert (HStoreList xs) = HStoreMap (Map.fromList xs) parseHStore :: P.Parser (Either UnicodeException HStoreList)-parseHStore =- reverseEither [] <$> P.sepBy' (skipWhiteSpace *> parseHStoreKeyVal)- (skipWhiteSpace *> P.word8 (c2w ','))- where- reverseEither acc [] = Right (HStoreList acc)- reverseEither _acc ((Left err):_xs) = Left err- reverseEither acc ((Right x ):xs) = reverseEither (x:acc) xs+parseHStore = do+ kvs <- P.sepBy' (skipWhiteSpace *> parseHStoreKeyVal)+ (skipWhiteSpace *> P.word8 (c2w ','))+ return $ HStoreList <$> sequence kvs parseHStoreKeyVal :: P.Parser (Either UnicodeException (Text,Text)) parseHStoreKeyVal = do