Safe Haskell | None |
---|---|
Language | Haskell2010 |
Feed table definitions.
Synopsis
- getHashes :: FeedElement -> [Int]
- newtype JsonElement = JsonElement {}
- data Entry = Entry {}
- prettyShortEntry :: Entry -> Doc AnsiStyle
- prettyEntry :: Entry -> Doc AnsiStyle
- makeEntry :: FeedLocation -> Set Text -> Entry
- matching :: FeedQuery -> Int -> Entry -> Bool
- data FeedStatus
- = Unknown
- | New
- | LastUpdate UTCTime
- data EntryKey
- data Handle m = Handle {}
- readOnly :: Monad m => Handle m -> Handle m -> Handle m
- data DatabaseException
- fetch1 :: Monad m => MonadThrow m => Handle m -> EntryKey -> m (Int, Entry)
- fetch :: Monad m => Handle m -> [EntryKey] -> m (Map EntryKey (Int, Entry))
- fetchQuery :: Monad m => Handle m -> (Int -> Entry -> Bool) -> m (Map Int Entry)
- fetchAll :: Monad m => Handle m -> m (Map Int Entry)
- update :: Monad m => Handle m -> [EntryKey] -> (Entry -> Entry) -> m ()
- insert :: MonadThrow m => Handle m -> Handle m -> Entry -> m Int
- insertList :: Monad m => Handle m -> Handle m -> [Entry] -> m (Map FeedLocation Int)
- delete1 :: Monad m => Handle m -> Handle m -> EntryKey -> m ()
- delete :: Monad m => Handle m -> Handle m -> [EntryKey] -> m ()
- purge :: Monad m => Handle m -> Handle m -> m ()
- commit :: Monad m => Handle m -> Handle m -> m ()
- register :: MonadThrow m => Handle m -> Handle m -> FeedLocation -> Set Text -> m Int
- getStatus :: MonadCatch m => Handle m -> EntryKey -> m FeedStatus
- markAsProcessed :: MonadThrow m => MonadTime m => Handle m -> Handle m -> EntryKey -> FeedElement -> m ()
- markAsUnprocessed :: MonadThrow m => Handle m -> Handle m -> EntryKey -> m ()
- listUnprocessedElements :: MonadThrow m => Handle m -> EntryKey -> m [FeedElement]
- isRead :: MonadCatch m => Handle m -> EntryKey -> FeedElement -> m Bool
- resolveEntryKey :: Monad m => Handle m -> FeedQuery -> m [EntryKey]
- resolveFeedLocation :: Monad m => Handle m -> EntryKey -> m FeedLocation
Types
getHashes :: FeedElement -> [Int] Source #
newtype JsonElement Source #
Newtype wrapper to provide FromJSON
and ToJSON
instances for FeedElement
Instances
Eq JsonElement Source # | |
Defined in Imm.Database.Feed (==) :: JsonElement -> JsonElement -> Bool # (/=) :: JsonElement -> JsonElement -> Bool # | |
Ord JsonElement Source # | |
Defined in Imm.Database.Feed compare :: JsonElement -> JsonElement -> Ordering # (<) :: JsonElement -> JsonElement -> Bool # (<=) :: JsonElement -> JsonElement -> Bool # (>) :: JsonElement -> JsonElement -> Bool # (>=) :: JsonElement -> JsonElement -> Bool # max :: JsonElement -> JsonElement -> JsonElement # min :: JsonElement -> JsonElement -> JsonElement # | |
ToJSON JsonElement Source # | |
Defined in Imm.Database.Feed toJSON :: JsonElement -> Value # toEncoding :: JsonElement -> Encoding # toJSONList :: [JsonElement] -> Value # toEncodingList :: [JsonElement] -> Encoding # | |
ToJSONKey JsonElement Source # | |
Defined in Imm.Database.Feed | |
FromJSON JsonElement Source # | |
Defined in Imm.Database.Feed parseJSON :: Value -> Parser JsonElement # parseJSONList :: Value -> Parser [JsonElement] # | |
FromJSONKey JsonElement Source # | |
Entry | |
|
data FeedStatus Source #
Instances
Pretty FeedStatus Source # | |
Defined in Imm.Database.Feed pretty :: FeedStatus -> Doc ann # prettyList :: [FeedStatus] -> Doc ann # |
data DatabaseException Source #
NotCommitted | |
NotDeleted [FeedLocation] | |
KeyNotFound [EntryKey] | |
NotInserted [Entry] | |
NotPurged | |
NotUpdated FeedLocation | |
UnableFetchAll |
Instances
Eq DatabaseException Source # | |
Defined in Imm.Database.Feed (==) :: DatabaseException -> DatabaseException -> Bool # (/=) :: DatabaseException -> DatabaseException -> Bool # | |
Show DatabaseException Source # | |
Defined in Imm.Database.Feed showsPrec :: Int -> DatabaseException -> ShowS # show :: DatabaseException -> String # showList :: [DatabaseException] -> ShowS # | |
Exception DatabaseException Source # | |
Defined in Imm.Database.Feed | |
Pretty DatabaseException Source # | |
Defined in Imm.Database.Feed pretty :: DatabaseException -> Doc ann # prettyList :: [DatabaseException] -> Doc ann # |
Low-level primitives
insertList :: Monad m => Handle m -> Handle m -> [Entry] -> m (Map FeedLocation Int) Source #
High-level queries
register :: MonadThrow m => Handle m -> Handle m -> FeedLocation -> Set Text -> m Int Source #
getStatus :: MonadCatch m => Handle m -> EntryKey -> m FeedStatus Source #
markAsProcessed :: MonadThrow m => MonadTime m => Handle m -> Handle m -> EntryKey -> FeedElement -> m () Source #
markAsUnprocessed :: MonadThrow m => Handle m -> Handle m -> EntryKey -> m () Source #
listUnprocessedElements :: MonadThrow m => Handle m -> EntryKey -> m [FeedElement] Source #
isRead :: MonadCatch m => Handle m -> EntryKey -> FeedElement -> m Bool Source #
resolveFeedLocation :: Monad m => Handle m -> EntryKey -> m FeedLocation Source #