Code

store: Added matchers comparing two expressions.
[sysdb.git] / src / core / store-private.h
index 6dc68c0c1fe6f837a55c61b1c92b5208d342cf58..4f9b9b59f71d4d103540020ed2dba04cc09a7a5a 100644 (file)
@@ -148,6 +148,11 @@ enum {
        MATCHER_EQ,
        MATCHER_GE,
        MATCHER_GT,
+       MATCHER_CMP_LT,
+       MATCHER_CMP_LE,
+       MATCHER_CMP_EQ,
+       MATCHER_CMP_GE,
+       MATCHER_CMP_GT,
        MATCHER_ISNULL,
 };
 
@@ -198,6 +203,16 @@ typedef struct {
 } uop_matcher_t;
 #define UOP_M(m) ((uop_matcher_t *)(m))
 
+/* compare operator matcher */
+typedef struct {
+       sdb_store_matcher_t super;
+
+       /* left and right hand expressions */
+       sdb_store_expr_t *left;
+       sdb_store_expr_t *right;
+} cmp_matcher_t;
+#define CMP_M(m) ((cmp_matcher_t *)(m))
+
 /* match any type of object by it's name */
 typedef struct {
        sdb_store_matcher_t super;