tll_foreach(db->repos, cur) {
if (repo == NULL || strcasecmp(cur->item->name, repo) == 0) {
if (*pattern == '@')
if (pattern != NULL && *pattern == '@')
rit = cur->item->ops->groupquery(cur->item, pattern + 1, match);
else
rit = cur->item->ops->query(cur->item, cond, pattern, match);