mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-04 22:05:55 +00:00
* core: Mobile.hs postgres interface * sqlite * fix * errors * postgres * rename * rename, refactor * merge files * rename * update simplexmq --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
29 lines
858 B
Haskell
29 lines
858 B
Haskell
{-# LANGUAGE CPP #-}
|
|
|
|
module Simplex.Chat.Store
|
|
( DBStore,
|
|
StoreError (..),
|
|
ChatLockEntity (..),
|
|
UserMsgReceiptSettings (..),
|
|
UserContactLink (..),
|
|
AutoAccept (..),
|
|
createChatStore,
|
|
migrations, -- used in tests
|
|
withTransaction,
|
|
)
|
|
where
|
|
|
|
import Simplex.Chat.Store.Profiles
|
|
import Simplex.Chat.Store.Shared
|
|
import Simplex.Messaging.Agent.Store.Common (DBStore (..), withTransaction)
|
|
import Simplex.Messaging.Agent.Store.Interface (DBOpts, createDBStore)
|
|
import Simplex.Messaging.Agent.Store.Shared (MigrationConfirmation, MigrationError)
|
|
#if defined(dbPostgres)
|
|
import Simplex.Chat.Store.Postgres.Migrations
|
|
#else
|
|
import Simplex.Chat.Store.SQLite.Migrations
|
|
#endif
|
|
|
|
createChatStore :: DBOpts -> MigrationConfirmation -> IO (Either MigrationError DBStore)
|
|
createChatStore dbCreateOpts = createDBStore dbCreateOpts migrations
|