summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01f0a45)
raw | patch | inline | side by side (parent: 01f0a45)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 20 May 2015 06:48:42 +0000 (08:48 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 20 May 2015 06:48:42 +0000 (08:48 +0200) |
src/core/store-private.h | patch | blob | history | |
src/core/store_lookup.c | patch | blob | history | |
src/include/core/store.h | patch | blob | history |
index 4ea2f94bf469aa177f0803fccc2a1218d0b25907..700fed60ff723f4e60bd986bff75df9c805fe4aa 100644 (file)
--- a/src/core/store-private.h
+++ b/src/core/store-private.h
MATCHER_ANY,
MATCHER_ALL,
MATCHER_IN,
- MATCHER_NIN,
/* unary operators */
MATCHER_ISNULL,
: ((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" \
index c840b0e0a56636ec5b2712d49d22fff155f546b2..82bb3d6d6cf1e50f9cc0b3c748a797e37bbb0fb6 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
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,
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 */
match_iter,
match_iter,
match_in,
- match_in,
/* unary operators */
match_unary,
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)
{
index 8a80852a7a5ba44d64659b1fc10713a67c7b3b18..c8b7941b1d6e1bcaecf264cc994d2b7b041ef6ab 100644 (file)
--- a/src/include/core/store.h
+++ b/src/include/core/store.h
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: