X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fstore-private.h;h=700fed60ff723f4e60bd986bff75df9c805fe4aa;hb=9e9da48f6ee767b23a1d9b4fdd890f9201bf274b;hp=060ec7bccf02c7b19acfccc7a6d29b5058986c01;hpb=cc35394b0c4af9ccfbe7b0a18713758a9f29d247;p=sysdb.git diff --git a/src/core/store-private.h b/src/core/store-private.h index 060ec7b..700fed6 100644 --- a/src/core/store-private.h +++ b/src/core/store-private.h @@ -103,6 +103,18 @@ typedef struct { #define _last_update super.last_update #define _interval super.interval +/* + * querying + */ + +struct sdb_store_query { + sdb_object_t super; + sdb_ast_node_t *ast; + sdb_store_matcher_t *matcher; + sdb_store_matcher_t *filter; +}; +#define QUERY(m) ((sdb_store_query_t *)(m)) + /* * expressions */ @@ -148,11 +160,11 @@ enum { MATCHER_ANY, MATCHER_ALL, MATCHER_IN, - MATCHER_NIN, /* unary operators */ MATCHER_ISNULL, - MATCHER_ISNNULL, + MATCHER_ISTRUE, + MATCHER_ISFALSE, /* ary operators */ MATCHER_LT, @@ -175,9 +187,9 @@ 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_ISNNULL) ? "IS NOT NULL" \ + : ((t) == MATCHER_ISTRUE) ? "IS TRUE" \ + : ((t) == MATCHER_ISFALSE) ? "IS FALSE" \ : ((t) == MATCHER_LT) ? "<" \ : ((t) == MATCHER_LE) ? "<=" \ : ((t) == MATCHER_EQ) ? "=" \ @@ -237,16 +249,8 @@ typedef struct { typedef struct { sdb_store_matcher_t super; sdb_store_expr_t *expr; -} isnull_matcher_t; -#define ISNULL_M(m) ((isnull_matcher_t *)(m)) - -typedef struct { - sdb_store_matcher_t super; - sdb_ast_node_t *ast; - sdb_store_matcher_t *matcher; - sdb_store_matcher_t *filter; -} query_matcher_t; -#define QUERY_M(m) ((query_matcher_t *)(m)) +} unary_matcher_t; +#define UNARY_M(m) ((unary_matcher_t *)(m)) #ifdef __cplusplus } /* extern "C" */