persistent-sqlite 2.6.3.1 → 2.6.3.2
raw patch · 4 files changed
+12/−8 lines, 4 filesnew-uploader
Files
- ChangeLog.md +4/−0
- Database/Persist/Sqlite.hs +4/−4
- Database/Sqlite.hs +3/−3
- persistent-sqlite.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 2.6.3.2++* Provide more detailed error messages when using the `step` function [#730](https://github.com/yesodweb/persistent/pull/730)+ ## 2.6.3.1 * Fix migration to avoid creating foreign-key constraints in temporary tables [#736](https://github.com/yesodweb/persistent/pull/736)
Database/Persist/Sqlite.hs view
@@ -136,7 +136,7 @@ -- Turn on the write-ahead log -- https://github.com/yesodweb/persistent/issues/363 turnOnWal <- Sqlite.prepare conn "PRAGMA journal_mode=WAL;"- _ <- Sqlite.step turnOnWal+ _ <- Sqlite.step conn turnOnWal Sqlite.reset conn turnOnWal Sqlite.finalize turnOnWal @@ -144,7 +144,7 @@ -- Turn on foreign key constraints -- https://github.com/yesodweb/persistent/issues/646 turnOnFK <- Sqlite.prepare conn "PRAGMA foreign_keys = on;"- _ <- Sqlite.step turnOnFK+ _ <- Sqlite.step conn turnOnFK Sqlite.reset conn turnOnFK Sqlite.finalize turnOnFK @@ -253,7 +253,7 @@ execute' :: Sqlite.Connection -> Sqlite.Statement -> [PersistValue] -> IO Int64 execute' conn stmt vals = flip finally (liftIO $ Sqlite.reset conn stmt) $ do Sqlite.bind stmt vals- _ <- Sqlite.step stmt+ _ <- Sqlite.step conn stmt Sqlite.changes conn withStmt'@@ -269,7 +269,7 @@ return pull where pull = do- x <- liftIO $ Sqlite.step stmt+ x <- liftIO $ Sqlite.step conn stmt case x of Sqlite.Done -> return () Sqlite.Row -> do
Database/Sqlite.hs view
@@ -254,13 +254,13 @@ stepError (Statement statement) = do error <- stepC statement return $ decodeError error-step :: Statement -> IO StepResult-step statement = do+step :: Connection -> Statement -> IO StepResult+step database statement = do error <- stepError statement case error of ErrorRow -> return Row ErrorDone -> return Done- _ -> sqlError Nothing "step" error+ _ -> sqlError (Just database) "step" error foreign import ccall "sqlite3_reset" resetC :: Ptr () -> IO Int
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.6.3.1+version: 2.6.3.2 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>