Update VodRecordDao.java+del all

pull/102/head
watson1982 3 years ago committed by GitHub
parent 59ded04205
commit ac67c213c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/com/github/tvbox/osc/cache/VodRecordDao.java

@ -30,6 +30,9 @@ public interface VodRecordDao {
@Query("select count(*) from vodRecord")
int getCount();
@Query("DELETE FROM vodRecord")
void deleteAll();
/**
* 保留最新指定条数, 其他删除.
* @param size 保留条数
@ -37,4 +40,4 @@ public interface VodRecordDao {
*/
@Query("DELETE FROM vodRecord where id NOT IN (SELECT id FROM vodRecord ORDER BY updateTime desc LIMIT :size)")
int reserver(int size);
}
}

Loading…
Cancel
Save