Added FTS index worker

This commit is contained in:
M66B
2020-01-14 22:39:35 +01:00
parent acca352e5a
commit 9c9a96e8f1
9 changed files with 2233 additions and 42 deletions

View File

@@ -227,6 +227,11 @@ public interface DaoMessage {
" ORDER BY message.received DESC")
List<Long> getMessageIdsByFolder(Long folder);
@Query("SELECT id FROM message" +
" WHERE content AND NOT fts" +
" ORDER BY message.received DESC")
Cursor getMessageFts();
@Query("SELECT id, account, thread, (:find IS NULL" +
" OR `from` LIKE :find COLLATE NOCASE" +
" OR `to` LIKE :find COLLATE NOCASE" +
@@ -437,6 +442,9 @@ public interface DaoMessage {
@Query("UPDATE message SET notifying = :notifying WHERE id = :id")
int setMessageNotifying(long id, int notifying);
@Query("UPDATE message SET fts = :fts WHERE id = :id")
int setMessageFts(long id, boolean fts);
@Query("UPDATE message SET received = :received WHERE id = :id")
int setMessageReceived(long id, long received);