persistent-sqlite 0.7.0 → 0.8.0
raw patch · 3 files changed
+9/−9 lines, 3 filesdep ~conduitdep ~persistent
Dependency ranges changed: conduit, persistent
Files
- Database/Persist/Sqlite.hs +3/−3
- Database/Sqlite.hs +3/−3
- persistent-sqlite.cabal +3/−3
Database/Persist/Sqlite.hs view
@@ -119,10 +119,10 @@ pull _ = liftIO $ do x <- Sqlite.step stmt case x of- Sqlite.Done -> return C.Closed+ Sqlite.Done -> return C.IOClosed Sqlite.Row -> do cols <- liftIO $ Sqlite.columns stmt- return $ C.Open cols+ return $ C.IOOpen cols showSqlType :: SqlType -> String showSqlType SqlString = "VARCHAR" showSqlType SqlInt32 = "INTEGER"@@ -236,7 +236,7 @@ ] sqlColumn :: Column -> String-sqlColumn (Column name isNull typ def ref) = concat+sqlColumn (Column name isNull typ def _maxLen ref) = concat [ "," , T.unpack $ escape name , " "
Database/Sqlite.hs view
@@ -33,7 +33,7 @@ import qualified Data.ByteString.Internal as BSI import Foreign import Foreign.C-import Database.Persist.Store (PersistValue (..))+import Database.Persist.Store (PersistValue (..), listToJSON, mapToJSON) import Data.Text (Text, pack, unpack) import Data.Text.Encoding (encodeUtf8, decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode)@@ -341,8 +341,8 @@ PersistDay d -> bindText statement parameterIndex $ pack $ show d PersistTimeOfDay d -> bindText statement parameterIndex $ pack $ show d PersistUTCTime d -> bindText statement parameterIndex $ pack $ show d- PersistList _ -> P.error "Refusing to serialize a PersistList to a SQLite value"- PersistMap _ -> P.error "Refusing to serialize a PersistMap to a SQLite value"+ PersistList l -> bindText statement parameterIndex $ listToJSON l+ PersistMap m -> bindText statement parameterIndex $ mapToJSON m PersistObjectId _ -> P.error "Refusing to serialize a PersistObjectId to a SQLite value" ) $ zip [1..] sqlData
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 0.7.0+version: 0.8.0 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -20,12 +20,12 @@ build-depends: base >= 4 && < 5 , bytestring >= 0.9.1 && < 0.10 , transformers >= 0.2.1 && < 0.3- , persistent >= 0.7 && < 0.8+ , persistent >= 0.8 && < 0.9 , monad-control >= 0.2 && < 0.4 , containers >= 0.2 && < 0.5 , text >= 0.7 && < 1 , aeson >= 0.5- , conduit+ , conduit >= 0.2 exposed-modules: Database.Sqlite Database.Persist.Sqlite ghc-options: -Wall