index 11d85fea0a5ead05b42f6fffd089b6b135b0bcb9..513b6a64a7a824c5263eec708945c14a3812cfe6 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
{
sdb_avltree_iter_t *iter = NULL;
int status;
- int all = 0;
+ int all = (int)(m->type == MATCHER_ALL);
- assert(m->type == MATCHER_ANY);
+ assert((m->type == MATCHER_ANY) || (m->type == MATCHER_ALL));
/* TODO: support all object types */
if (obj->type != SDB_HOST)
match_logical,
match_unary,
match_iter,
+ match_iter,
match_lt,
match_le,
match_eq,
return NULL;
return M(sdb_object_create("any-matcher", iter_type,
MATCHER_ANY, type, m));
-} /* sdb_store_iter_matcher */
+} /* sdb_store_any_matcher */
+
+sdb_store_matcher_t *
+sdb_store_all_matcher(int type, sdb_store_matcher_t *m)
+{
+ if ((type != SDB_SERVICE) && (type != SDB_METRIC)
+ && (type != SDB_ATTRIBUTE))
+ return NULL;
+ return M(sdb_object_create("all-matcher", iter_type,
+ MATCHER_ALL, type, m));
+} /* sdb_store_all_matcher */
sdb_store_matcher_t *
sdb_store_lt_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right)