Lines Matching refs:Mailbox
53 import com.android.emailcommon.provider.Mailbox;
82 "create trigger mailbox_delete before delete on " + Mailbox.TABLE_NAME +
94 " begin delete from " + Mailbox.TABLE_NAME +
125 // Version 13: Add messageCount to Mailbox table.
129 // Version 17: Add parentKey to Mailbox table
130 // Version 18: Copy Mailbox.displayName to Mailbox.serverId for all IMAP & POP3 mailboxes.
131 // Column Mailbox.serverId is used for the server-side pathname of a mailbox.
135 // Version 21: Add lastSeenMessageKey column to Mailbox table
137 // Version 23: Add column to mailbox table for time of last access
145 // Version 31: Add columns to mailbox for ui status/last result
146 // Version 32: Add columns to mailbox for last notified message key/count; insure not null
149 // Version 34: Add total count to mailbox
157 // Version 102&103: Add hierarchicalName to Mailbox
166 // Version 112: Convert Mailbox syncInterval to a boolean (whether or not this mailbox
177 // "search_results" folder to reflect the mailbox that the server considers
217 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT +
225 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT +
230 // Change a message's mailbox.
233 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT +
236 "; update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT +
261 * Neither message is in a SEARCH type mailbox, and
262 * The new message's mailbox's account is an exchange account.
267 * (select type from Mailbox where _id=new.mailboxKey) != 8 and
272 * (select Mailbox.type from Mailbox where _id=mailboxKey) != 8; end
279 + "(select " + MailboxColumns.TYPE + " from " + Mailbox.TABLE_NAME
281 + MessageColumns.MAILBOX_KEY + ")!=" + Mailbox.TYPE_SEARCH
293 + " and (select " + Mailbox.TABLE_NAME + "." + MailboxColumns.TYPE + " from "
294 + Mailbox.TABLE_NAME + " where " + MailboxColumns._ID + "="
295 + MessageColumns.MAILBOX_KEY + ")!=" + Mailbox.TYPE_SEARCH +"; end");
365 // Add triggers to keep unread count accurate per mailbox
370 // Insert a message; if flagRead is zero, add to the unread count of the message's mailbox
373 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UNREAD_COUNT +
378 // Delete a message; if flagRead is zero, decrement the unread count of the msg's mailbox
381 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UNREAD_COUNT +
386 // Change a message's mailbox
390 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UNREAD_COUNT +
393 "; update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UNREAD_COUNT +
402 " begin update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.UNREAD_COUNT +
616 db.execSQL("create table " + Mailbox.TABLE_NAME + s);
618 + " on " + Mailbox.TABLE_NAME + " (" + MailboxColumns.SERVER_ID + ")");
620 + " on " + Mailbox
621 // Deleting a Mailbox deletes associated Messages in all three tables
627 db.execSQL("drop table " + Mailbox.TABLE_NAME);
826 /** Counts the number of messages in each mailbox, and updates the message count column. */
829 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.MESSAGE_COUNT +
832 Mailbox.TABLE_NAME + "." + MailboxColumns._ID + ")");
966 db.execSQL("alter table " + Mailbox.TABLE_NAME
967 + " add column " + Mailbox.MESSAGE_COUNT
1013 db.execSQL("alter table " + Mailbox.TABLE_NAME
1014 + " add column " + Mailbox.PARENT_KEY + " integer;");
1112 db.execSQL("alter table " + Mailbox.TABLE_NAME
1113 + " add column " + Mailbox.UI_SYNC_STATUS + " integer;");
1114 db.execSQL("alter table " + Mailbox.TABLE_NAME
1115 + " add column " + Mailbox.UI_LAST_SYNC_RESULT + " integer;");
1123 db.execSQL("alter table " + Mailbox.TABLE_NAME
1124 + " add column " + Mailbox.LAST_NOTIFIED_MESSAGE_KEY + " integer;");
1125 db.execSQL("alter table " + Mailbox.TABLE_NAME
1126 + " add column " + Mailbox.LAST_NOTIFIED_MESSAGE_COUNT + " integer;");
1127 db.execSQL("update Mailbox set " + Mailbox.LAST_NOTIFIED_MESSAGE_KEY +
1128 "=0 where " + Mailbox.LAST_NOTIFIED_MESSAGE_KEY + " IS NULL");
1129 db.execSQL("update Mailbox set " + Mailbox.LAST_NOTIFIED_MESSAGE_COUNT +
1130 "=0 where " + Mailbox.LAST_NOTIFIED_MESSAGE_COUNT + " IS NULL");
1156 db.execSQL("alter table " + Mailbox.TABLE_NAME
1165 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1167 Mailbox.DRAFTS_DEFAULT_TOUCH_TIME + " WHERE " + MailboxColumns.TYPE +
1168 " = " + Mailbox.TYPE_DRAFTS);
1169 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1171 Mailbox.SENT_DEFAULT_TOUCH_TIME + " WHERE " + MailboxColumns.TYPE +
1172 " = " + Mailbox.TYPE_SENT);
1181 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1183 Mailbox.FLAG_SUPPORTS_SETTINGS + " where (" +
1184 MailboxColumns.FLAGS + "&" + Mailbox.FLAG_HOLDS_MAIL + ")!=0 and " +
1221 db.execSQL("alter table " + Mailbox.TABLE_NAME
1285 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.SYNC_INTERVAL
1286 + "=" + Mailbox.CHECK_INTERVAL_PUSH + " where "
1287 + MailboxColumns.SYNC_INTERVAL + "<" + Mailbox.CHECK_INTERVAL_PUSH);
1296 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.SYNC_LOOKBACK
1304 db.execSQL("delete from " + Mailbox.TABLE_NAME + " where " + MailboxColumns.TYPE
1305 + "=" +Mailbox.TYPE_EAS_ACCOUNT_MAILBOX);
1308 // Mailbox sync interval now indicates whether this mailbox syncs with the rest
1311 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.SYNC_INTERVAL
1313 + Mailbox.CHECK_INTERVAL_NEVER + " then 0 else 1 end");
1326 db.execSQL("alter table " + Mailbox.TABLE_NAME
1330 db.update(Mailbox.TABLE_NAME, cv, null, null);
1367 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.SYNC_INTERVAL
1393 db.execSQL("update " + Mailbox.TABLE_NAME + " set " + MailboxColumns.SYNC_INTERVAL
1394 + "=0 where " + MailboxColumns.TYPE + "=" + Mailbox.TYPE_DRAFTS);
1400 + MailboxColumns._ID + " from " + Mailbox.TABLE_NAME + " where "
1401 + MailboxColumns.TYPE + "=" + Mailbox.TYPE_DRAFTS + ")");
1418 db.execSQL("delete from " + Mailbox.TABLE_NAME + " where "
1419 + Mailbox.TYPE + "=" + Mailbox.TYPE_SEARCH);
1520 //sqlite> UPDATE mailbox SET serverid=displayname WHERE mailbox._id in (
1521 // ...> SELECT mailbox._id FROM mailbox,account,hostauth WHERE
1522 // ...> (mailbox.parentkey isnull OR mailbox.parentkey=0) AND
1523 // ...> mailbox.accountkey=account._id AND
1528 "UPDATE " + Mailbox.TABLE_NAME + " SET "
1531 + Mailbox.TABLE_NAME + "." + MailboxColumns._ID + " IN ( SELECT "
1532 + Mailbox.TABLE_NAME + "." + MailboxColumns._ID + " FROM "
1533 + Mailbox.TABLE_NAME + "," + Account.TABLE_NAME + ","
1536 + Mailbox.TABLE_NAME + "." + MailboxColumns.PARENT_KEY + " isnull OR "
1537 + Mailbox.TABLE_NAME + "." + MailboxColumns.PARENT_KEY + "=0 "
1539 + Mailbox.TABLE_NAME + "." + MailboxColumns.ACCOUNT_KEY + "="
1668 db.execSQL("alter table " + Mailbox.TABLE_NAME
1669 + " add column " + Mailbox.LAST_TOUCHED_TIME + " integer default 0;");
1849 db.execSQL("update Mailbox set " + Mailbox.LAST_NOTIFIED_MESSAGE_KEY +
1850 "=0 where " + Mailbox.LAST_NOTIFIED_MESSAGE_KEY + " IS NULL");
1851 db.execSQL("update Mailbox set " + Mailbox.LAST_NOTIFIED_MESSAGE_COUNT +
1852 "=0 where " + Mailbox.LAST_NOTIFIED_MESSAGE_COUNT + " IS NULL");
1868 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1870 Mailbox.DRAFTS_DEFAULT_TOUCH_TIME + " WHERE " + MailboxColumns.TYPE +
1871 " = " + Mailbox.TYPE_DRAFTS);
1872 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1874 Mailbox.SENT_DEFAULT_TOUCH_TIME + " WHERE " + MailboxColumns.TYPE +
1875 " = " + Mailbox.TYPE_SENT);
1882 db.execSQL("update " + Mailbox.TABLE_NAME + " set " +
1884 Mailbox.FLAG_SUPPORTS_SETTINGS + " where (" +
1885 MailboxColumns.FLAGS + "&" + Mailbox.FLAG_HOLDS_MAIL + ")!=0 and " +