Trever Fischer has proposed merging lp:~tdfischer/zeitgeist/bluebird into lp:zeitgeist.
Requested reviews: Seif Lotfy (seif) For more details, see: https://code.launchpad.net/~tdfischer/zeitgeist/bluebird/+merge/97026 Fixes #953041 -- https://code.launchpad.net/~tdfischer/zeitgeist/bluebird/+merge/97026 Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
=== modified file 'extensions/ds-registry.vala' --- extensions/ds-registry.vala 2012-03-12 13:41:16 +0000 +++ extensions/ds-registry.vala 2012-03-12 14:19:24 +0000 @@ -144,7 +144,7 @@ return registry; } - private static Variant to_variant ( + public static Variant to_variant ( HashTable<string, DataSource> sources) { var vb = new VariantBuilder (new VariantType (SIG_DATASOURCES)); === modified file 'src/db-reader.vala' --- src/db-reader.vala 2012-02-05 14:52:13 +0000 +++ src/db-reader.vala 2012-03-12 14:19:24 +0000 @@ -652,7 +652,7 @@ where.add_wildcard_condition ("actor", val, negated); else where.add_match_condition ("actor", - actors_table.get_id (val), negated); + actors_table.find_id (val), negated); } // Origin @@ -712,7 +712,7 @@ "subj_mimetype", val, negated); else where.add_match_condition ("subj_mimetype", - mimetypes_table.get_id (val), negated); + mimetypes_table.find_id (val), negated); } // URI @@ -851,14 +851,14 @@ if (symbols.length () == 1) { subwhere.add_match_condition (table_name, - lookup_table.get_id (_symbol)); + lookup_table.find_id (_symbol)); } else { var sb = new StringBuilder (); foreach (unowned string uri in symbols) { - sb.append_printf ("%d,", lookup_table.get_id (uri)); + sb.append_printf ("%d,", lookup_table.find_id (uri)); } sb.truncate (sb.len - 1); === modified file 'src/table-lookup.vala' --- src/table-lookup.vala 2012-02-13 20:14:41 +0000 +++ src/table-lookup.vala 2012-03-12 14:19:24 +0000 @@ -75,6 +75,25 @@ } } + /** + * Searches the table for the given ID, returns -1 if not found. + * + * @see get_id + */ + public int find_id (string name) + { + int id = value_to_id.lookup (name); + if (id == 0) + return -1; + return id; + } + + /** + * Searches the table for the given ID, inserts a new one if not found. + * + * @see find_id + * + */ public int get_id (string name) { int id = value_to_id.lookup (name);
_______________________________________________ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp