X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fstore-private.h;h=be262ec61ecfb901a2fb12ff96667d8083f5786c;hb=33c80b1c2a05192e6b912558f99d19a4d7f9ef06;hp=a64c22094b539574c7158bd2e11e1bd2556ad849;hpb=26e53bce7d3f75e7dabed7238ca946e2c230ae3c;p=sysdb.git diff --git a/src/core/store-private.h b/src/core/store-private.h index a64c220..be262ec 100644 --- a/src/core/store-private.h +++ b/src/core/store-private.h @@ -145,19 +145,12 @@ typedef struct { } attr_cond_t; #define ATTR_C(obj) ((attr_cond_t *)(obj)) -typedef struct { - sdb_store_cond_t super; - int field; - sdb_store_expr_t *expr; -} obj_cond_t; -#define OBJ_C(obj) ((obj_cond_t *)(obj)) - /* * matchers */ -/* when adding to this, also update 'MATCHER_SYM' below as well as 'matchers' - * and 'matchers_tostring' in store_lookup.c */ +/* when adding to this, also update 'MATCHER_SYM' below and 'matchers' in + * store_lookup.c */ enum { MATCHER_OR, MATCHER_AND, @@ -178,9 +171,11 @@ enum { MATCHER_CMP_NE, MATCHER_CMP_GE, MATCHER_CMP_GT, + MATCHER_IN, MATCHER_REGEX, MATCHER_NREGEX, MATCHER_ISNULL, + MATCHER_ISNNULL, }; #define MATCHER_SYM(t) \ @@ -198,9 +193,11 @@ enum { : ((t) == MATCHER_CMP_NE) ? "!=" \ : ((t) == MATCHER_GE) ? ">=" \ : ((t) == MATCHER_GT) ? ">" \ + : ((t) == MATCHER_IN) ? "IN" \ : ((t) == MATCHER_REGEX) ? "=~" \ : ((t) == MATCHER_NREGEX) ? "!~" \ : ((t) == MATCHER_ISNULL) ? "IS NULL" \ + : ((t) == MATCHER_ISNNULL) ? "IS NOT NULL" \ : "UNKNOWN") /* match the name of something */ @@ -272,7 +269,7 @@ typedef struct { typedef struct { sdb_store_matcher_t super; - char *attr_name; /* we only support matching attributes */ + sdb_store_expr_t *expr; } isnull_matcher_t; #define ISNULL_M(m) ((isnull_matcher_t *)(m))