From 6db7512abe1b80d81cac84e73c84f571e4eb194b Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 20 May 2015 08:48:42 +0200 Subject: [PATCH] store: Remove (now unused) sdb_store_nin_matcher(). --- src/core/store-private.h | 2 -- src/core/store_lookup.c | 12 +----------- src/include/core/store.h | 8 -------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/core/store-private.h b/src/core/store-private.h index 4ea2f94..700fed6 100644 --- a/src/core/store-private.h +++ b/src/core/store-private.h @@ -160,7 +160,6 @@ enum { MATCHER_ANY, MATCHER_ALL, MATCHER_IN, - MATCHER_NIN, /* unary operators */ MATCHER_ISNULL, @@ -188,7 +187,6 @@ enum { : ((t) == MATCHER_ANY) ? "ANY" \ : ((t) == MATCHER_ALL) ? "ALL" \ : ((t) == MATCHER_IN) ? "IN" \ - : ((t) == MATCHER_NIN) ? "NOT IN" \ : ((t) == MATCHER_ISNULL) ? "IS NULL" \ : ((t) == MATCHER_ISTRUE) ? "IS TRUE" \ : ((t) == MATCHER_ISFALSE) ? "IS FALSE" \ diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index c840b0e..82bb3d6 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -258,7 +258,7 @@ match_in(sdb_store_matcher_t *m, sdb_store_obj_t *obj, sdb_data_t value = SDB_DATA_INIT, array = SDB_DATA_INIT; int status = 1; - assert((m->type == MATCHER_IN) || (m->type == MATCHER_NIN)); + assert(m->type == MATCHER_IN); assert(CMP_M(m)->left && CMP_M(m)->right); if (expr_eval2(CMP_M(m)->left, &value, @@ -269,8 +269,6 @@ match_in(sdb_store_matcher_t *m, sdb_store_obj_t *obj, status = sdb_data_inarray(&value, &array); expr_free_datum2(CMP_M(m)->left, &value, CMP_M(m)->right, &array); - if (m->type == MATCHER_NIN) - return !status; return status; } /* match_in */ @@ -342,7 +340,6 @@ matchers[] = { match_iter, match_iter, match_in, - match_in, /* unary operators */ match_unary, @@ -602,13 +599,6 @@ sdb_store_in_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right) MATCHER_IN, left, right)); } /* sdb_store_in_matcher */ -sdb_store_matcher_t * -sdb_store_nin_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right) -{ - return M(sdb_object_create("not-in-matcher", cmp_type, - MATCHER_NIN, left, right)); -} /* sdb_store_in_matcher */ - sdb_store_matcher_t * sdb_store_regex_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right) { diff --git a/src/include/core/store.h b/src/include/core/store.h index 8a80852..c8b7941 100644 --- a/src/include/core/store.h +++ b/src/include/core/store.h @@ -569,14 +569,6 @@ sdb_store_all_matcher(sdb_store_expr_t *iter, sdb_store_matcher_t *m); sdb_store_matcher_t * sdb_store_in_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right); -/* - * sdb_store_nin_matcher: - * Like sdb_store_in_matcher but matches if the left value is not included in - * the right value. - */ -sdb_store_matcher_t * -sdb_store_nin_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right); - /* * sdb_store_lt_matcher, sdb_store_le_matcher, sdb_store_eq_matcher, * sdb_store_ge_matcher, sdb_store_gt_matcher: -- 2.30.2