Revert "Reduce number of invalidations"

This reverts commit 845eff88b4.
pull/156/head
M66B 5 years ago
parent 57a9d0ae54
commit f5132de1f4

@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 87,
"identityHash": "54e4606798a2b98908f5ba9b31401294",
"identityHash": "2329269ef351fecd73eff3e3a525e658",
"entities": [
{
"tableName": "identity",
@ -1773,27 +1773,10 @@
"foreignKeys": []
}
],
"views": [
{
"viewName": "accountprop",
"createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account"
},
{
"viewName": "folderprop",
"createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, account, name, type, download, display, unified, notify FROM folder"
},
{
"viewName": "attachmentprop",
"createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, message, name FROM attachment"
},
{
"viewName": "operationprop",
"createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, folder, message, name FROM operation"
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '54e4606798a2b98908f5ba9b31401294')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2329269ef351fecd73eff3e3a525e658')"
]
}
}

@ -68,10 +68,6 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory;
EntityLog.class
},
views = {
EntityAccountProp.class,
EntityFolderProp.class,
EntityAttachmentProp.class,
EntityOperationProp.class
}
)
@ -871,14 +867,6 @@ public abstract class DB extends RoomDatabase {
public void migrate(SupportSQLiteDatabase db) {
Log.i("DB migration from version " + startVersion + " to " + endVersion);
db.execSQL("DROP VIEW `folderview`");
db.execSQL("CREATE VIEW `accountprop` AS " +
"SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account");
db.execSQL("CREATE VIEW `folderprop` AS " +
"SELECT id, account, name, type, download, display, unified, notify FROM folder");
db.execSQL("CREATE VIEW `attachmentprop` AS " +
"SELECT id, message, name FROM attachment");
db.execSQL("CREATE VIEW `operationprop` AS " +
"SELECT id, folder, message, name FROM operation");
}
})
.build();

@ -46,7 +46,7 @@ public interface DaoAccount {
@Query("SELECT account.*" +
", (SELECT COUNT(message.id)" +
" FROM message" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folder ON folder.id = message.folder" +
" WHERE message.account = account.id" +
" AND folder.type <> '" + EntityFolder.ARCHIVE + "'" +
" AND folder.type <> '" + EntityFolder.TRASH + "'" +
@ -60,7 +60,7 @@ public interface DaoAccount {
" AND identity.synchronize) AS identities" +
", CASE WHEN drafts.id IS NULL THEN 0 ELSE 1 END AS drafts" +
" FROM account" +
" LEFT JOIN folderprop AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
" LEFT JOIN folder AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE :all OR account.synchronize" +
" GROUP BY account.id" +
" ORDER BY CASE WHEN :all THEN 0 ELSE account.`order` END" +
@ -84,16 +84,16 @@ public interface DaoAccount {
" (SELECT COUNT(account.id) FROM account" +
" WHERE synchronize" +
" AND state = 'connected') AS accounts" +
", (SELECT COUNT(operation.id) FROM operationprop AS operation" +
" JOIN folderprop AS folder ON folder.id = operation.folder" +
" JOIN accountprop AS account ON account.id = folder.account" + // not outbox
", (SELECT COUNT(operation.id) FROM operation" +
" JOIN folder ON folder.id = operation.folder" +
" JOIN account ON account.id = folder.account" + // not outbox
" WHERE account.synchronize) AS operations")
LiveData<TupleAccountStats> liveStats();
@Query("SELECT account.id, l.id AS swipe_left, l.type AS left_type, r.id AS swipe_right, r.type AS right_type" +
" FROM accountprop AS account" +
" LEFT JOIN folderprop AS l ON l.id = account.swipe_left" +
" LEFT JOIN folderprop r ON r.id = account.swipe_right")
" FROM account" +
" LEFT JOIN folder l ON l.id = account.swipe_left" +
" LEFT JOIN folder r ON r.id = account.swipe_right")
LiveData<List<TupleAccountSwipes>> liveAccountSwipes();
@Insert

@ -37,7 +37,7 @@ public interface DaoContact {
@Query("SELECT contact.*, account.name AS accountName" +
" FROM contact" +
" JOIN accountprop AS account ON account.id = contact.account" +
" JOIN account ON account.id = contact.account" +
" ORDER BY times_contacted DESC, last_contacted DESC")
LiveData<List<TupleContactEx>> liveContacts();

@ -45,13 +45,13 @@ public interface DaoFolder {
List<TupleFolderEx> getFoldersEx(long account);
@Query("SELECT folder.* FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE account.synchronize" +
" AND folder.synchronize AND unified")
List<EntityFolder> getFoldersSynchronizingUnified();
@Query("SELECT folder.* FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE folder.id = :folder" +
" AND (:search OR (account.synchronize AND account.browse))")
EntityFolder getBrowsableFolder(long folder, boolean search);
@ -59,7 +59,7 @@ public interface DaoFolder {
@Query("SELECT folder.*" +
", account.`order` AS accountOrder, account.name AS accountName" +
" FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE account.`synchronize`")
List<TupleFolderSort> getSortedFolders();
@ -99,7 +99,7 @@ public interface DaoFolder {
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id) AS operations" +
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
" FROM folder" +
" LEFT JOIN accountprop AS account ON account.id = folder.account" +
" LEFT JOIN account ON account.id = folder.account" +
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
" WHERE account.id IS NULL" +
" OR (account.`synchronize` AND folder.navigation)" +
@ -107,7 +107,7 @@ public interface DaoFolder {
LiveData<List<TupleFolderNav>> liveNavigation();
@Query("SELECT folder.* FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE account.synchronize" +
" AND account.`primary`" +
" AND folder.type = '" + EntityFolder.DRAFTS + "'")
@ -149,19 +149,19 @@ public interface DaoFolder {
EntityFolder getFolderByType(long account, String type);
@Query("SELECT folder.* FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE `primary` AND type = '" + EntityFolder.DRAFTS + "'")
EntityFolder getPrimaryDrafts();
@Query("SELECT folder.* FROM folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN account ON account.id = folder.account" +
" WHERE `primary` AND type = '" + EntityFolder.ARCHIVE + "'")
EntityFolder getPrimaryArchive();
@Query("SELECT * FROM folder WHERE type = '" + EntityFolder.OUTBOX + "'")
EntityFolder getOutbox();
@Query("SELECT download FROM folderprop WHERE id = :id")
@Query("SELECT download FROM folder WHERE id = :id")
boolean getFolderDownload(long id);
@Insert

@ -30,13 +30,13 @@ import java.util.List;
@Dao
public interface DaoIdentity {
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN account ON account.id = identity.account" +
" WHERE NOT :synchronize OR account.synchronize")
LiveData<List<TupleIdentityEx>> liveIdentities(boolean synchronize);
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE (:account IS NULL OR identity.account = :account)" +
" AND identity.synchronize" +
" AND account.synchronize" +
@ -45,8 +45,8 @@ public interface DaoIdentity {
List<TupleIdentityEx> getComposableIdentities(Long account);
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN accountprop AS account ON account.id = identity.account" +
" JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE (:account IS NULL OR identity.account = :account)" +
" AND identity.synchronize" +
" AND account.synchronize")

@ -48,15 +48,15 @@ public interface DaoMessage {
", COUNT(message.id) AS count" +
", " + unseen_unified + " AS unseen" +
", " + unflagged_unified + " AS unflagged" +
", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" +
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" +
", SUM(message.size) AS totalSize" +
", MAX(CASE WHEN :found OR folder.unified THEN message.received ELSE 0 END) AS dummy" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR ui_found = :found)" +
@ -94,16 +94,16 @@ public interface DaoMessage {
", COUNT(message.id) AS count" +
", " + unseen_folder + " AS unseen" +
", " + unflagged_folder + " AS unflagged" +
", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" +
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" +
", SUM(message.size) AS totalSize" +
", MAX(CASE WHEN folder.id = :folder THEN message.received ELSE 0 END) AS dummy" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folderprop AS f ON f.id = :folder" +
" JOIN folder ON folder.id = message.folder" +
" JOIN folder AS f ON f.id = :folder" +
" WHERE (message.account = f.account OR " + is_outbox + ")" +
" AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR ui_found = :found)" +
@ -137,14 +137,14 @@ public interface DaoMessage {
", 1 AS count" +
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
", CASE WHEN message.ui_flagged THEN 0 ELSE 1 END AS unflagged" +
", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
", CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END AS drafts" +
", 1 AS visible" +
", message.size AS totalSize" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folder ON folder.id = message.folder" +
" WHERE message.account = :account" +
" AND message.thread = :thread" +
" AND (:id IS NULL OR message.id = :id)" +
@ -157,7 +157,7 @@ public interface DaoMessage {
", COUNT(message.id) AS count" +
", SUM(message.ui_seen) AS seen" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" WHERE message.account = :account" +
" AND message.thread = :thread" +
" AND (:id IS NULL OR message.id = :id)" +
@ -165,7 +165,7 @@ public interface DaoMessage {
" GROUP BY account.id")
LiveData<TupleThreadStats> liveThreadStats(long account, String thread, Long id);
@Query("SELECT message.id FROM folderprop AS folder" +
@Query("SELECT message.id FROM folder" +
" JOIN message ON message.folder = folder.id" +
" WHERE CASE WHEN :folder IS NULL THEN folder.unified ELSE folder.id = :folder END" +
" AND ui_hide")
@ -208,7 +208,7 @@ public interface DaoMessage {
List<Long> getMessageIdsByFolder(Long folder);
@Query("SELECT message.id" +
" FROM folderprop AS folder" +
" FROM folder" +
" JOIN message ON message.folder = folder.id" +
" WHERE CASE WHEN :folder IS NULL THEN folder.unified ELSE folder.id = :folder END" +
" AND NOT ui_hide" +
@ -243,14 +243,14 @@ public interface DaoMessage {
", 1 AS count" +
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
", CASE WHEN message.ui_flagged THEN 0 ELSE 1 END AS unflagged" +
", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
", CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END AS drafts" +
", 1 AS visible" +
", message.size AS totalSize" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folder ON folder.id = message.folder" +
" WHERE message.id = :id")
LiveData<TupleMessageEx> liveMessage(long id);
@ -266,9 +266,9 @@ public interface DaoMessage {
", 1 AS visible" +
", message.size AS totalSize" +
" FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND folder.notify" +
" AND (account.created IS NULL OR message.received > account.created)" +
@ -279,8 +279,8 @@ public interface DaoMessage {
LiveData<List<TupleMessageEx>> liveUnseenNotify();
@Query("SELECT COUNT(message.id) FROM message" +
" JOIN accountprop AS account ON account.id = message.account" +
" JOIN folderprop AS folder ON folder.id = message.folder" +
" JOIN account ON account.id = message.account" +
" JOIN folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND folder.unified" +
" AND (account.created IS NULL OR message.received > account.created)" +
@ -298,7 +298,7 @@ public interface DaoMessage {
List<Long> getUids(long folder, Long received);
@Query("SELECT message.* FROM message" +
" JOIN folderprop AS folder on folder.id = message.folder" +
" JOIN folder on folder.id = message.folder" +
" WHERE message.account = :account" +
" AND folder.type = '" + EntityFolder.OUTBOX + "'" +
" AND sent IS NOT NULL")
@ -398,7 +398,7 @@ public interface DaoMessage {
@Query("UPDATE message SET ui_ignored = 1" +
" WHERE NOT ui_ignored" +
" AND folder IN (SELECT id FROM folderprop WHERE type = '" + EntityFolder.INBOX + "')")
" AND folder IN (SELECT id FROM folder WHERE type = '" + EntityFolder.INBOX + "')")
int ignoreAll();
@Query("UPDATE message SET ui_found = 1" +
@ -436,7 +436,7 @@ public interface DaoMessage {
" WHERE folder = :folder" +
" AND uid IS NULL" +
" AND NOT EXISTS" +
" (SELECT * FROM operationprop AS operation" +
" (SELECT * FROM operation" +
" WHERE operation.message = message.id" +
" AND operation.name = '" + EntityOperation.ADD + "')")
int deleteOrphans(long folder);

@ -32,9 +32,9 @@ public interface DaoOperation {
" ,((account.synchronize IS NULL OR account.synchronize)" +
" AND (NOT folder.account IS NULL OR identity.synchronize IS NULL OR identity.synchronize)) AS synchronize" +
" FROM operation" +
" JOIN folderprop AS folder ON folder.id = operation.folder" +
" JOIN folder ON folder.id = operation.folder" +
" LEFT JOIN message ON message.id = operation.message" +
" LEFT JOIN accountprop AS account ON account.id = message.account OR account.id = folder.account" +
" LEFT JOIN account ON account.id = message.account OR account.id = folder.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" ORDER BY" +
" CASE WHEN operation.name = '" + EntityOperation.SYNC + "' THEN" +
@ -45,9 +45,9 @@ public interface DaoOperation {
LiveData<List<TupleOperationEx>> liveOperations();
String GET_OPS_FOLDER = "SELECT operation.* FROM operation" +
" JOIN folderprop AS folder ON folder.id = operation.folder" +
" JOIN folder ON folder.id = operation.folder" +
" LEFT JOIN message ON message.id = operation.message" +
" LEFT JOIN accountprop AS account ON account.id = message.account" +
" LEFT JOIN account ON account.id = message.account" +
" LEFT JOIN identity ON identity.id = message.identity" +
" WHERE operation.folder = :folder" +
" AND (account.synchronize IS NULL OR account.synchronize)" +
@ -70,7 +70,7 @@ public interface DaoOperation {
" FROM operation")
LiveData<TupleOperationStats> liveStats();
@Query("SELECT COUNT(operation.id) FROM operationprop AS operation" +
@Query("SELECT COUNT(operation.id) FROM operation" +
" WHERE operation.name = '" + EntityOperation.SEND + "'")
LiveData<Integer> liveUnsent();
@ -83,12 +83,12 @@ public interface DaoOperation {
@Query("SELECT * FROM operation WHERE error IS NOT NULL")
List<EntityOperation> getOperationsError();
@Query("SELECT COUNT(id) FROM operationprop AS operation" +
@Query("SELECT COUNT(id) FROM operation" +
" WHERE folder = :folder" +
" AND (:name IS NULL OR operation.name = :name)")
int getOperationCount(long folder, String name);
@Query("SELECT COUNT(id) FROM operationprop" +
@Query("SELECT COUNT(id) FROM operation" +
" WHERE folder = :folder" +
" AND message = :message")
int getOperationCount(long folder, long message);

@ -41,14 +41,14 @@ public interface DaoRule {
List<EntityRule> getEnabledRules(long folder);
@Query("SELECT rule.*, folder.account, folder.name AS folderName, account.name AS accountName FROM rule" +
" JOIN folderprop AS folder ON folder.id = rule.folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN folder ON folder.id = rule.folder" +
" JOIN account ON account.id = folder.account" +
" WHERE rule.id = :id")
TupleRuleEx getRule(long id);
@Query("SELECT rule.*, folder.account, folder.name AS folderName, account.name AS accountName FROM rule" +
" JOIN folderprop AS folder ON folder.id = rule.folder" +
" JOIN accountprop AS account ON account.id = folder.account" +
" JOIN folder ON folder.id = rule.folder" +
" JOIN account ON account.id = folder.account" +
" WHERE rule.folder = :folder" +
" ORDER BY `order`, name COLLATE NOCASE")
LiveData<List<TupleRuleEx>> liveRules(long folder);

@ -1,44 +0,0 @@
package eu.faircode.email;
/*
This file is part of FairEmail.
FairEmail is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FairEmail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
Copyright 2018-2019 by Marcel Bokhorst (M66B)
*/
import androidx.annotation.NonNull;
import androidx.room.DatabaseView;
@DatabaseView(
viewName = "accountprop",
value = "SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account")
public class EntityAccountProp {
public Long id;
public String name;
public Integer color;
@NonNull
public Boolean synchronize;
@NonNull
public Boolean primary;
@NonNull
public Boolean notify;
@NonNull
public Boolean browse = true;
public Long swipe_left;
public Long swipe_right;
public Long created;
public Integer order;
}

@ -1,33 +0,0 @@
package eu.faircode.email;
/*
This file is part of FairEmail.
FairEmail is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FairEmail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
Copyright 2018-2019 by Marcel Bokhorst (M66B)
*/
import androidx.annotation.NonNull;
import androidx.room.DatabaseView;
@DatabaseView(
viewName = "attachmentprop",
value = "SELECT id, message, name FROM attachment")
public class EntityAttachmentProp {
public Long id;
@NonNull
public Long message;
public String name;
}

@ -1,42 +0,0 @@
package eu.faircode.email;
/*
This file is part of FairEmail.
FairEmail is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FairEmail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
Copyright 2018-2019 by Marcel Bokhorst (M66B)
*/
import androidx.annotation.NonNull;
import androidx.room.DatabaseView;
@DatabaseView(
viewName = "folderprop",
value = "SELECT id, account, name, type, download, display, unified, notify FROM folder")
public class EntityFolderProp {
public Long id;
public Long account;
@NonNull
public String name;
@NonNull
public String type;
@NonNull
public Boolean download = true;
public String display;
@NonNull
public Boolean unified = false;
@NonNull
public Boolean notify = false;
}

@ -1,35 +0,0 @@
package eu.faircode.email;
/*
This file is part of FairEmail.
FairEmail is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FairEmail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
Copyright 2018-2019 by Marcel Bokhorst (M66B)
*/
import androidx.annotation.NonNull;
import androidx.room.DatabaseView;
@DatabaseView(
viewName = "operationprop",
value = "SELECT id, folder, message, name FROM operation")
public class EntityOperationProp {
public Long id;
@NonNull
public Long folder;
public Long message;
@NonNull
public String name;
}
Loading…
Cancel
Save