mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-31 07:35:55 +00:00
* core: split Store.hs to multiple files for faster re-compilation * remove unused compiler pragmas
27 lines
803 B
Haskell
27 lines
803 B
Haskell
module Simplex.Chat.Store
|
|
( SQLiteStore,
|
|
StoreError (..),
|
|
UserContactLink (..),
|
|
AutoAccept (..),
|
|
createChatStore,
|
|
migrations, -- used in tests
|
|
chatStoreFile,
|
|
agentStoreFile,
|
|
withTransaction,
|
|
)
|
|
where
|
|
|
|
import Simplex.Chat.Store.Migrations
|
|
import Simplex.Chat.Store.Profiles
|
|
import Simplex.Chat.Store.Shared
|
|
import Simplex.Messaging.Agent.Store.SQLite (MigrationConfirmation, MigrationError, SQLiteStore (..), createSQLiteStore, withTransaction)
|
|
|
|
createChatStore :: FilePath -> String -> MigrationConfirmation -> IO (Either MigrationError SQLiteStore)
|
|
createChatStore dbPath dbKey = createSQLiteStore dbPath dbKey migrations
|
|
|
|
chatStoreFile :: FilePath -> FilePath
|
|
chatStoreFile = (<> "_chat.db")
|
|
|
|
agentStoreFile :: FilePath -> FilePath
|
|
agentStoreFile = (<> "_agent.db")
|