[geary/wip/725929-startup] Limit manual INNER JOIN to only the message_ids in question
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/725929-startup] Limit manual INNER JOIN to only the message_ids in question
- Date: Tue, 19 Aug 2014 23:21:08 +0000 (UTC)
commit 991e2b75b3f4fe67db9b306c7355dac3b1e5253f
Author: Jim Nelson <jim yorba org>
Date: Tue Aug 19 16:19:20 2014 -0700
Limit manual INNER JOIN to only the message_ids in question
src/engine/imap-db/imap-db-folder.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala
index 32a58d2..62a4179 100644
--- a/src/engine/imap-db/imap-db-folder.vala
+++ b/src/engine/imap-db/imap-db-folder.vala
@@ -2082,8 +2082,17 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
return;
StringBuilder sql = new StringBuilder("""
- SELECT id FROM MessageTable WHERE fields <> ?
+ SELECT id FROM MessageTable WHERE id IN (
""");
+ bool first = true;
+ foreach (LocationIdentifier location_id in locations) {
+ if (!first)
+ sql.append(",");
+
+ sql.append(location_id.message_id.to_string());
+ first = false;
+ }
+ sql.append(") AND fields <> ?");
Db.Statement stmt = cx.prepare(sql.str);
stmt.bind_int(0, Geary.Email.Field.ALL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]