zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04008
[Merge] lp:~zeitgeist/zeitgeist/bb_IN_OR into lp:~zeitgeist/zeitgeist/bluebird
Seif Lotfy has proposed merging lp:~zeitgeist/zeitgeist/bb_IN_OR into lp:~zeitgeist/zeitgeist/bluebird.
Requested reviews:
Zeitgeist Framework Team (zeitgeist)
For more details, see:
https://code.launchpad.net/~zeitgeist/zeitgeist/bb_IN_OR/+merge/74683
--
https://code.launchpad.net/~zeitgeist/zeitgeist/bb_IN_OR/+merge/74683
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/bb_IN_OR into lp:~zeitgeist/zeitgeist/bluebird.
=== modified file 'src/engine.vala'
--- src/engine.vala 2011-09-08 17:49:17 +0000
+++ src/engine.vala 2011-09-08 20:40:37 +0000
@@ -1049,10 +1049,20 @@
WhereClause subwhere = new WhereClause(
WhereClause.Type.OR, negated);
- foreach (string uri in symbols)
+
+ if (symbols.length() == 1)
{
subwhere.add_match_condition (table_name,
- lookup_table.get_id (uri));
+ lookup_table.get_id (_symbol));
+ }
+ else
+ {
+ string in_sql = "";
+ foreach (string uri in symbols)
+ in_sql += "%i,".printf(lookup_table.get_id (uri));
+ string sql = "%s %s IN (%s)".printf(table_name,
+ (negated) ? "NOT": "", in_sql[0:-1]);
+ subwhere.add(sql);
}
return subwhere;
}
Follow ups