persistent-sqlite 2.13.1.1 → 2.13.2.0
raw patch · 4 files changed
+25/−2 lines, 4 files
Files
- ChangeLog.md +6/−0
- Database/Persist/Sqlite.hs +18/−1
- cbits/sqlite3.c too large to diff
- persistent-sqlite.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,11 @@ # Changelog for persistent-sqlite +## 2.13.2++* [#1488](https://github.com/yesodweb/persistent/pull/1488)+ * Add `openRawSqliteConn` for creating `RawSqlite SqlBackend` connections+ that aren't automatically cleaned-up.+ ## 2.13.1.1 * [#1459](https://github.com/yesodweb/persistent/pull/1459)
Database/Persist/Sqlite.hs view
@@ -48,6 +48,7 @@ , ForeignKeyViolation(..) , checkForeignKeys , RawSqlite+ , openRawSqliteConn , persistentBackend , rawSqliteConnection , withRawSqliteConnInfo@@ -94,8 +95,8 @@ import qualified Data.Conduit.List as CL import Data.Foldable (toList) import qualified Data.HashMap.Lazy as HashMap-import Data.Int (Int64) import Data.IORef (newIORef)+import Data.Int (Int64) import Data.Maybe import Data.Pool (Pool) import Data.Text (Text)@@ -937,6 +938,22 @@ { _persistentBackend :: backend -- ^ The persistent backend , _rawSqliteConnection :: Sqlite.Connection -- ^ The underlying `Sqlite.Connection` }++-- | Open a @'RawSqlite' 'SqlBackend'@ connection from a 'SqliteConnectionInfo'.+--+-- When using this function, the caller has to accept the responsibility of+-- cleaning up the resulting connection. To do this, use 'close' with the+-- 'rawSqliteConnection' - it's enough to simply drop the 'persistBackend'+-- afterwards.+--+-- @since 2.13.2+openRawSqliteConn+ :: (MonadUnliftIO m, MonadLoggerIO m)+ => SqliteConnectionInfo+ -> m (RawSqlite SqlBackend)+openRawSqliteConn connInfo = do+ logFunc <- askLoggerIO+ liftIO $ openWith RawSqlite connInfo logFunc instance BackendCompatible b (RawSqlite b) where projectBackend = _persistentBackend
cbits/sqlite3.c view
file too large to diff
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.13.1.1+version: 2.13.2.0 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>