| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Store
Synopsis
- data DBStore
- data StoreError
- = SEDuplicateName
- | SEUserNotFound {
- userId :: UserId
- | SEUserNotFoundByName { }
- | SEUserNotFoundByContactId { }
- | SEUserNotFoundByGroupId { }
- | SEUserNotFoundByFileId { }
- | SEUserNotFoundByContactRequestId {
- contactRequestId :: Int64
- | SEContactNotFound { }
- | SEContactNotFoundByName { }
- | SEContactNotFoundByMemberId { }
- | SEContactNotReady { }
- | SEDuplicateContactLink
- | SEUserContactLinkNotFound
- | SEContactRequestNotFound {
- contactRequestId :: Int64
- | SEContactRequestNotFoundByName { }
- | SEInvalidContactRequestEntity {
- contactRequestId :: Int64
- | SEInvalidBusinessChatContactRequest
- | SEGroupNotFound { }
- | SEGroupNotFoundByName { }
- | SEGroupMemberNameNotFound { }
- | SEGroupMemberNotFound { }
- | SEGroupMemberNotFoundByIndex {
- groupMemberIndex :: Int64
- | SEMemberRelationsVectorNotFound { }
- | SEGroupHostMemberNotFound { }
- | SEGroupMemberNotFoundByMemberId { }
- | SEMemberContactGroupMemberNotFound { }
- | SEInvalidMemberRelationUpdate
- | SEGroupWithoutUser
- | SEDuplicateGroupMember
- | SEGroupAlreadyJoined
- | SEGroupInvitationNotFound
- | SENoteFolderAlreadyExists { }
- | SENoteFolderNotFound { }
- | SEUserNoteFolderNotFound
- | SESndFileNotFound { }
- | SESndFileInvalid { }
- | SERcvFileNotFound { }
- | SERcvFileDescrNotFound { }
- | SEFileNotFound { }
- | SERcvFileInvalid { }
- | SERcvFileInvalidDescrPart
- | SELocalFileNoTransfer { }
- | SESharedMsgIdNotFoundByFileId { }
- | SEFileIdNotFoundBySharedMsgId { }
- | SESndFileNotFoundXFTP { }
- | SERcvFileNotFoundXFTP { }
- | SEConnectionNotFound { }
- | SEConnectionNotFoundById {
- connId :: Int64
- | SEConnectionNotFoundByMemberId { }
- | SEPendingConnectionNotFound {
- connId :: Int64
- | SEUniqueID
- | SELargeMsg
- | SEInternalError {
- message :: String
- | SEDBException {
- message :: String
- | SEDBBusyError {
- message :: String
- | SEBadChatItem {
- itemId :: ChatItemId
- itemTs :: Maybe ChatItemTs
- | SEChatItemNotFound {
- itemId :: ChatItemId
- | SEChatItemNotFoundByText {
- text :: Text
- | SEChatItemSharedMsgIdNotFound { }
- | SEChatItemNotFoundByFileId { }
- | SEChatItemNotFoundByContactId { }
- | SEChatItemNotFoundByGroupId { }
- | SEProfileNotFound {
- profileId :: Int64
- | SEDuplicateGroupLink { }
- | SEGroupLinkNotFound { }
- | SEHostMemberIdNotFound {
- groupId :: Int64
- | SEContactNotFoundByFileId { }
- | SENoGroupSndStatus { }
- | SEDuplicateGroupMessage {
- groupId :: Int64
- sharedMsgId :: SharedMsgId
- authorGroupMemberId :: Maybe GroupMemberId
- forwardedByGroupMemberId :: Maybe GroupMemberId
- | SERemoteHostNotFound { }
- | SERemoteHostUnknown
- | SERemoteHostDuplicateCA
- | SERemoteCtrlNotFound { }
- | SERemoteCtrlDuplicateCA
- | SEProhibitedDeleteUser { }
- | SEOperatorNotFound {
- serverOperatorId :: Int64
- | SEUsageConditionsNotFound
- | SEInvalidQuote
- | SEInvalidMention
- | SEInvalidDeliveryTask {
- taskId :: Int64
- | SEDeliveryTaskNotFound {
- taskId :: Int64
- | SEInvalidDeliveryJob {
- jobId :: Int64
- | SEDeliveryJobNotFound {
- jobId :: Int64
- | SEWorkItemError {
- errContext :: String
- data ChatLockEntity
- = CLInvitation ByteString
- | CLConnection Int64
- | CLContact ContactId
- | CLGroup GroupId
- | CLUserContact Int64
- | CLContactRequest Int64
- | CLFile Int64
- data UserMsgReceiptSettings = UserMsgReceiptSettings {
- enable :: Bool
- clearOverrides :: Bool
- data UserContactLink = UserContactLink {}
- data GroupLinkInfo = GroupLinkInfo {}
- data AddressSettings = AddressSettings {
- businessAddress :: Bool
- autoAccept :: Maybe AutoAccept
- autoReply :: Maybe MsgContent
- data AutoAccept = AutoAccept {}
- createChatStore :: DBOpts -> MigrationConfig -> IO (Either MigrationError DBStore)
- migrations :: [Migration]
- withTransaction :: DBStore -> (Connection -> IO a) -> IO a
Documentation
data StoreError Source #
Constructors
Instances
data ChatLockEntity Source #
Constructors
| CLInvitation ByteString | |
| CLConnection Int64 | |
| CLContact ContactId | |
| CLGroup GroupId | |
| CLUserContact Int64 | |
| CLContactRequest Int64 | |
| CLFile Int64 |
Instances
| Eq ChatLockEntity Source # | |
Defined in Simplex.Chat.Store.Shared Methods (==) :: ChatLockEntity -> ChatLockEntity -> Bool (/=) :: ChatLockEntity -> ChatLockEntity -> Bool | |
| Ord ChatLockEntity Source # | |
Defined in Simplex.Chat.Store.Shared Methods compare :: ChatLockEntity -> ChatLockEntity -> Ordering (<) :: ChatLockEntity -> ChatLockEntity -> Bool (<=) :: ChatLockEntity -> ChatLockEntity -> Bool (>) :: ChatLockEntity -> ChatLockEntity -> Bool (>=) :: ChatLockEntity -> ChatLockEntity -> Bool max :: ChatLockEntity -> ChatLockEntity -> ChatLockEntity min :: ChatLockEntity -> ChatLockEntity -> ChatLockEntity | |
data UserMsgReceiptSettings Source #
Constructors
| UserMsgReceiptSettings | |
Fields
| |
Instances
| Show UserMsgReceiptSettings Source # | |
Defined in Simplex.Chat.Store.Profiles Methods showsPrec :: Int -> UserMsgReceiptSettings -> ShowS show :: UserMsgReceiptSettings -> String showList :: [UserMsgReceiptSettings] -> ShowS | |
data UserContactLink Source #
Constructors
| UserContactLink | |
Fields
| |
Instances
| FromJSON UserContactLink Source # | |
Defined in Simplex.Chat.Store.Profiles Methods parseJSON :: Value -> Parser UserContactLink parseJSONList :: Value -> Parser [UserContactLink] omittedField :: Maybe UserContactLink | |
| ToJSON UserContactLink Source # | |
Defined in Simplex.Chat.Store.Profiles Methods toJSON :: UserContactLink -> Value toEncoding :: UserContactLink -> Encoding toJSONList :: [UserContactLink] -> Value toEncodingList :: [UserContactLink] -> Encoding omitField :: UserContactLink -> Bool | |
| Show UserContactLink Source # | |
Defined in Simplex.Chat.Store.Profiles Methods showsPrec :: Int -> UserContactLink -> ShowS show :: UserContactLink -> String showList :: [UserContactLink] -> ShowS | |
data GroupLinkInfo Source #
Constructors
| GroupLinkInfo | |
Fields | |
Instances
| Show GroupLinkInfo Source # | |
Defined in Simplex.Chat.Store.Profiles Methods showsPrec :: Int -> GroupLinkInfo -> ShowS show :: GroupLinkInfo -> String showList :: [GroupLinkInfo] -> ShowS | |
data AddressSettings Source #
Constructors
| AddressSettings | |
Fields
| |
Instances
| FromJSON AddressSettings Source # | |
Defined in Simplex.Chat.Store.Profiles Methods parseJSON :: Value -> Parser AddressSettings parseJSONList :: Value -> Parser [AddressSettings] omittedField :: Maybe AddressSettings | |
| ToJSON AddressSettings Source # | |
Defined in Simplex.Chat.Store.Profiles Methods toJSON :: AddressSettings -> Value toEncoding :: AddressSettings -> Encoding toJSONList :: [AddressSettings] -> Value toEncodingList :: [AddressSettings] -> Encoding omitField :: AddressSettings -> Bool | |
| Show AddressSettings Source # | |
Defined in Simplex.Chat.Store.Profiles Methods showsPrec :: Int -> AddressSettings -> ShowS show :: AddressSettings -> String showList :: [AddressSettings] -> ShowS | |
| Eq AddressSettings Source # | |
Defined in Simplex.Chat.Store.Profiles Methods (==) :: AddressSettings -> AddressSettings -> Bool (/=) :: AddressSettings -> AddressSettings -> Bool | |
data AutoAccept Source #
Constructors
| AutoAccept | |
Fields | |
Instances
| FromJSON AutoAccept Source # | |
Defined in Simplex.Chat.Store.Profiles Methods parseJSON :: Value -> Parser AutoAccept parseJSONList :: Value -> Parser [AutoAccept] omittedField :: Maybe AutoAccept | |
| ToJSON AutoAccept Source # | |
Defined in Simplex.Chat.Store.Profiles Methods toJSON :: AutoAccept -> Value toEncoding :: AutoAccept -> Encoding toJSONList :: [AutoAccept] -> Value toEncodingList :: [AutoAccept] -> Encoding omitField :: AutoAccept -> Bool | |
| Show AutoAccept Source # | |
Defined in Simplex.Chat.Store.Profiles Methods showsPrec :: Int -> AutoAccept -> ShowS show :: AutoAccept -> String showList :: [AutoAccept] -> ShowS | |
| Eq AutoAccept Source # | |
Defined in Simplex.Chat.Store.Profiles | |
createChatStore :: DBOpts -> MigrationConfig -> IO (Either MigrationError DBStore) Source #
migrations :: [Migration] Source #
The list of migrations in ascending order by date
withTransaction :: DBStore -> (Connection -> IO a) -> IO a #