Hello community,
here is the log from the commit of package ghc-persistent-sqlite for
openSUSE:Factory checked in at 2019-01-25 22:43:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-persistent-sqlite (Old)
and /work/SRC/openSUSE:Factory/.ghc-persistent-sqlite.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-persistent-sqlite"
Fri Jan 25 22:43:28 2019 rev:13 rq:667141 version:2.9.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-persistent-sqlite/ghc-persistent-sqlite.changes
2018-12-28 12:35:27.899957479 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-persistent-sqlite.new.28833/ghc-persistent-sqlite.changes
2019-01-25 22:43:29.599218736 +0100
@@ -1,0 +2,8 @@
+Mon Dec 31 03:01:33 UTC 2018 - [email protected]
+
+- Update persistent-sqlite to version 2.9.2.
+ ## 2.9.2
+
+ * Add enableExtendedResultCodes and disableExtendedResultCodes functions
+
+-------------------------------------------------------------------
Old:
----
persistent-sqlite-2.9.1.tar.gz
New:
----
persistent-sqlite-2.9.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-persistent-sqlite.spec ++++++
--- /var/tmp/diff_new_pack.AFKOaz/_old 2019-01-25 22:43:30.435217705 +0100
+++ /var/tmp/diff_new_pack.AFKOaz/_new 2019-01-25 22:43:30.435217705 +0100
@@ -19,7 +19,7 @@
%global pkg_name persistent-sqlite
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.9.1
+Version: 2.9.2
Release: 0
Summary: Backend for the persistent library using sqlite3
License: MIT
++++++ persistent-sqlite-2.9.1.tar.gz -> persistent-sqlite-2.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/persistent-sqlite-2.9.1/ChangeLog.md
new/persistent-sqlite-2.9.2/ChangeLog.md
--- old/persistent-sqlite-2.9.1/ChangeLog.md 2018-12-17 06:10:06.000000000
+0100
+++ new/persistent-sqlite-2.9.2/ChangeLog.md 2018-12-30 05:47:05.000000000
+0100
@@ -1,5 +1,9 @@
# Changelog for persistent-sqlite
+## 2.9.2
+
+* Add enableExtendedResultCodes and disableExtendedResultCodes functions
+
## 2.9.1
* Bump vendored SQLite library to
[3.26.0](https://www.sqlite.org/releaselog/3_26_0.html) to address [RCE bug:
`magellan`](https://blade.tencent.com/magellan/index_en.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/persistent-sqlite-2.9.1/Database/Sqlite.hs
new/persistent-sqlite-2.9.2/Database/Sqlite.hs
--- old/persistent-sqlite-2.9.1/Database/Sqlite.hs 2018-12-17
06:10:06.000000000 +0100
+++ new/persistent-sqlite-2.9.2/Database/Sqlite.hs 2018-12-30
05:47:05.000000000 +0100
@@ -33,10 +33,10 @@
-- fetch the rows from the table:
--
-- > {-#LANGUAGE OverloadedStrings#-}
- -- >
+ -- >
-- > import Database.Sqlite
-- > import Data.Text
- -- >
+ -- >
-- > main :: IO ()
-- > main = do
-- > conn <- open "/home/sibi/test.db"
@@ -73,7 +73,9 @@
freeLogFunction,
config,
status,
- softHeapLimit
+ softHeapLimit,
+ enableExtendedResultCodes,
+ disableExtendedResultCodes
)
where
@@ -229,6 +231,7 @@
foreign import ccall "sqlite3_open_v2"
openC :: CString -> Ptr (Ptr ()) -> Int -> CString -> IO Int
+
openError :: Text -> IO (Either Connection Error)
openError path' = do
let flag = sqliteFlagReadWrite .|. sqliteFlagCreate .|. sqliteFlagUri
@@ -266,6 +269,28 @@
ErrorOK -> return ()
_ -> sqlError (Just database) "close" error
+foreign import ccall "sqlite3_extended_result_codes"
+ sqlite3_extended_result_codesC :: Ptr () -> Int -> IO Int
+
+
+-- @since 2.9.2
+enableExtendedResultCodes :: Connection -> IO ()
+enableExtendedResultCodes con@(Connection _ (Connection' database)) = do
+ error <- sqlite3_extended_result_codesC database 1
+ let err = decodeError error
+ case err of
+ ErrorOK -> return ()
+ _ -> sqlError (Just con) "enableExtendedResultCodes" err
+
+-- @since 2.9.2
+disableExtendedResultCodes :: Connection -> IO ()
+disableExtendedResultCodes con@(Connection _ (Connection' database)) = do
+ error <- sqlite3_extended_result_codesC database 0
+ let err = decodeError error
+ case err of
+ ErrorOK -> return ()
+ _ -> sqlError (Just con) "disableExtendedResultCodes" err
+
foreign import ccall "sqlite3_prepare_v2"
prepareC :: Ptr () -> CString -> Int -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> IO
Int
prepareError :: Connection -> Text -> IO (Either Statement Error)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/persistent-sqlite-2.9.1/persistent-sqlite.cabal
new/persistent-sqlite-2.9.2/persistent-sqlite.cabal
--- old/persistent-sqlite-2.9.1/persistent-sqlite.cabal 2018-12-17
06:10:06.000000000 +0100
+++ new/persistent-sqlite-2.9.2/persistent-sqlite.cabal 2018-12-30
05:47:05.000000000 +0100
@@ -1,5 +1,5 @@
name: persistent-sqlite
-version: 2.9.1
+version: 2.9.2
license: MIT
license-file: LICENSE
author: Michael Snoyman <[email protected]>