rename row

This commit is contained in:
Joey Hess 2019-10-30 13:02:16 -04:00
parent aa27969e55
commit f6cfb84dfe
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -35,8 +35,8 @@ Associated
FileKeyIndex file key FileKeyIndex file key
Content Content
key Key key Key
cache InodeCache inodecache InodeCache
KeyCacheIndex key cache KeyInodeCacheIndex key inodecache
|] |]
containedTable :: TableName containedTable :: TableName
@ -114,7 +114,7 @@ addInodeCaches k is = queueDb $
getInodeCaches :: Key -> ReadHandle -> IO [InodeCache] getInodeCaches :: Key -> ReadHandle -> IO [InodeCache]
getInodeCaches k = readDb $ do getInodeCaches k = readDb $ do
l <- selectList [ContentKey ==. k] [] l <- selectList [ContentKey ==. k] []
return $ map (contentCache . entityVal) l return $ map (contentInodecache . entityVal) l
removeInodeCaches :: Key -> WriteHandle -> IO () removeInodeCaches :: Key -> WriteHandle -> IO ()
removeInodeCaches k = queueDb $ removeInodeCaches k = queueDb $
@ -131,7 +131,7 @@ isInodeKnown i s = readDb query
| sentinalInodesChanged s = | sentinalInodesChanged s =
withRawQuery likesql [] $ isJust <$> CL.head withRawQuery likesql [] $ isJust <$> CL.head
| otherwise = | otherwise =
isJust <$> selectFirst [ContentCache ==. i] [] isJust <$> selectFirst [ContentInodecache ==. i] []
likesql = T.concat likesql = T.concat
[ "SELECT key FROM content WHERE " [ "SELECT key FROM content WHERE "