Backend for the persistent library using sqlite3.

Version on this page:
LTS Haskell 12.22:2.8.2
Stackage Nightly 2018-12-12:2.9.0
Latest on Hackage:2.9.0

See all snapshots persistent-sqlite appears in

MIT licensed and maintained by Michael Snoyman

Module documentation for

This package includes a thin sqlite3 wrapper based on the direct-sqlite package, as well as the entire C library, so there are no system dependencies.


Changelog for persistent-sqlite


  • Added support for SQL isolation levels to via SqlBackend. [#812] SQLite technically only supports Serializable.
  • Update the vendored SQLite C library from 3.22.0 to 3.25.2. See the SQLite changelog for details.
  • Fix 832: repsertMany now matches mapM_ (uncurry repsert) and is atomic.


  • Add the extraPragmas setting

  • Add flag to enable full-text search extensions (enabled by default)
  • Add flag to enable URI filename support (enabled by default)
  • Add flag to enable using usleep (enabled by default)
    • Enabling usleep allows sqlite to use a finer granularity when sleeping (reduces time between locks)
  • Add flag to enable json1 extension (enabled by default)


  • Updated SqlBackend definition to set connPutManySql. #770


  • Switch from MonadBaseControl to MonadUnliftIO


  • Adds a new function stepConn, which uses an additional parameter to give more detailed error messages #750
  • Restores the previous function signature of step, which was accidentally changed in

  • This release accidentally broke API, and is deprecated on Hackage.
  • Provide more detailed error messages when using the step function #730

  • Fix migration to avoid creating foreign-key constraints in temporary tables #736


  • Add ‘use-pkgconfig’ flag to use pkg-config to find system SQLite library.


  • Turned on foreign key constraints #646
  • Added new SqliteConnectionInfo-based API


  • Added functions to monitor (status) and control (softHeapLimit) process-wide SQLite memory usage.

  • Ensure connection is closed if wrapConnectionWal fails


Compatibility for backend-specific upsert functionality. A lucky contributor could try to add upsert to the sqlite backend now. It would definitely be tricky though because sqlite does not really have this feature.


  • changes for read/write typeclass split


  • Upgrade to SQLite 3.12.1 #551


  • Upgrade to SQLite #444


Update to persistent 2.2

  • Add missing source files #382


  • Add log support to persistent-sqlite #381


  • Added a Show instance for SqliteConf.
  • Use SqliteException instead of calling fail #364


  • Turn on write-ahead log #363
    • Prepending WAL=off to your connection string will recover the previous behavior.

Fix rendering of UTCTime to match SQLite requirements (see issue #328).


Provide a FromJSON instance for SqliteConf.

comments powered byDisqus