simplify timeline cleanup (#1932)
* simplify timeline cleanup * fix test
This commit is contained in:
parent
986eb9d542
commit
a6673a6eb2
5 changed files with 26 additions and 35 deletions
|
|
@ -99,9 +99,8 @@ WHERE timelineUserId = :accountId AND (serverId = :statusId OR reblogServerId =
|
|||
AND serverId = :statusId""")
|
||||
abstract fun delete(accountId: Long, statusId: String)
|
||||
|
||||
@Query("""DELETE FROM TimelineStatusEntity WHERE timelineUserId = :accountId
|
||||
AND authorServerId != :accountServerId AND createdAt < :olderThan""")
|
||||
abstract fun cleanup(accountId: Long, accountServerId: String, olderThan: Long)
|
||||
@Query("""DELETE FROM TimelineStatusEntity WHERE createdAt < :olderThan""")
|
||||
abstract fun cleanup(olderThan: Long)
|
||||
|
||||
@Query("""UPDATE TimelineStatusEntity SET poll = :poll
|
||||
WHERE timelineUserId = :accountId AND (serverId = :statusId OR reblogServerId = :statusId)""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue