X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fcore%2Fstore_expr.c;h=642255e4ab94c77028e1f1779d77fd56bfe3584a;hp=5e15f5350b9ca26d16564317e46957e8285fbcd3;hb=c1907b60719f4e9a8e5b29aef5c8e25d62f4cde2;hpb=026ce2bb377f4055e3a0a1d20a2f91e5a73a49b0 diff --git a/src/core/store_expr.c b/src/core/store_expr.c index 5e15f53..642255e 100644 --- a/src/core/store_expr.c +++ b/src/core/store_expr.c @@ -263,44 +263,6 @@ sdb_store_expr_eval(sdb_store_expr_t *expr, sdb_store_obj_t *obj, return status; } /* sdb_store_expr_eval */ -bool -sdb_store_expr_iterable(sdb_store_expr_t *expr, int context) -{ - if (expr->type == TYPED_EXPR) { - if ((context != SDB_HOST) && (context != SDB_SERVICE) - && (context != SDB_METRIC)) - return 0; - if (context == expr->data.data.integer) - return 0; - if ((expr->data.data.integer != SDB_SERVICE) - && (expr->data.data.integer != SDB_METRIC) - && (expr->data.data.integer != SDB_ATTRIBUTE)) - return 0; - if ((context == SDB_SERVICE) - && (expr->data.data.integer == SDB_METRIC)) - return 0; - else if ((context == SDB_METRIC) - && (expr->data.data.integer == SDB_SERVICE)) - return 0; - return 1; - } - else if (expr->type == FIELD_VALUE) { - if ((context != SDB_HOST) && (context != SDB_SERVICE) - && (context != SDB_METRIC) && (context != SDB_ATTRIBUTE)) - return 0; - if (expr->data.data.integer == SDB_FIELD_BACKEND) - return 1; - else if (expr->data.data.integer == SDB_FIELD_VALUE) - /* we don't current support this just like when using - * the attribute[] syntax */ - return 0; - } - else if (! expr->type) { - return !!(expr->data.type & SDB_TYPE_ARRAY); - } - return 0; -} /* sdb_store_expr_iterable */ - sdb_store_expr_iter_t * sdb_store_expr_iter(sdb_store_expr_t *expr, sdb_store_obj_t *obj, sdb_store_matcher_t *filter)