persistent-sqlite 2.13.1.1 → 2.13.2.0
raw patch · 4 files changed
+25/−2 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Database.Persist.Sqlite: openRawSqliteConn :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> m (RawSqlite SqlBackend)
- Database.Persist.Sqlite: persistentBackend :: forall backend_akf7 backend_aoPW. Lens (RawSqlite backend_akf7) (RawSqlite backend_aoPW) backend_akf7 backend_aoPW
+ Database.Persist.Sqlite: persistentBackend :: forall backend_akik backend_aoWe. Lens (RawSqlite backend_akik) (RawSqlite backend_aoWe) backend_akik backend_aoWe
- Database.Persist.Sqlite: rawSqliteConnection :: forall backend_akf7. Lens' (RawSqlite backend_akf7) Connection
+ Database.Persist.Sqlite: rawSqliteConnection :: forall backend_akik. Lens' (RawSqlite backend_akik) Connection
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>