Added log types

This commit is contained in:
M66B
2021-08-15 20:32:34 +02:00
parent f6ab6ced81
commit b8bddfedbf
8 changed files with 2695 additions and 116 deletions

View File

@@ -30,14 +30,16 @@ import java.util.List;
public interface DaoLog {
@Query("SELECT * FROM log" +
" WHERE time > :from" +
" AND (:type IS NULL OR type = :type)" +
" ORDER BY time DESC" +
" LIMIT 2000")
LiveData<List<EntityLog>> liveLogs(long from);
LiveData<List<EntityLog>> liveLogs(long from, Integer type);
@Query("SELECT * FROM log" +
" WHERE time > :from" +
" AND (:type IS NULL OR type = :type)" +
" ORDER BY time DESC")
List<EntityLog> getLogs(long from);
List<EntityLog> getLogs(long from, Integer type);
@Insert
long insertLog(EntityLog log);