First rouind of extracting the "load messages from the db" column list

This commit is contained in:
Jesse Vincent 2009-12-27 16:50:14 +00:00
parent 1ea96796d6
commit 9796cb6487

View file

@ -561,6 +561,16 @@ public class LocalStore extends Store implements Serializable
private String prefId = null;
private String mPushState = null;
/*
* a String containing the columns getMessages expects to work with
* in the correct order.
*/
private String GET_MESSAGES_COLS =
"subject, sender_list, date, uid, flags, id, to_list, cc_list, "
+ "bcc_list, reply_to_list, attachment_count, internal_date, message_id ";
public LocalFolder(String name)
{
this.mName = name;
@ -1217,9 +1227,9 @@ public class LocalStore extends Store implements Serializable
try
{
cursor = mDb.rawQuery(
"SELECT subject, sender_list, date, uid, flags, id, to_list, cc_list, "
+ "bcc_list, reply_to_list, attachment_count, internal_date, message_id "
+ "FROM messages " + "WHERE uid = ? " + "AND folder_id = ?",
"SELECT "
+ GET_MESSAGES_COLS
+ "FROM messages WHERE uid = ? AND folder_id = ?",
new String[]
{
message.getUid(), Long.toString(mFolderId)