Code

store: Added support for regex matchers.
[sysdb.git] / src / include / core / store.h
index 9304acfa79e1f7761928a76dad17e161d02db09f..1729f0c8bcbcedcac1dbc21f773d5d0195bd47fd 100644 (file)
@@ -449,6 +449,17 @@ sdb_store_cmp_ge(sdb_store_expr_t *left, sdb_store_expr_t *right);
 sdb_store_matcher_t *
 sdb_store_cmp_gt(sdb_store_expr_t *left, sdb_store_expr_t *right);
 
+/*
+ * sdb_store_regex_matcher:
+ * Creates a matcher which matches the string value the left expression
+ * evaluates to against the regular expression the right expression evaluates
+ * to. The right expression may either be a constant value regular expression
+ * or string or a dynamic value evaluating to a string. In the latter case,
+ * the string is compiled to a regex every time the matcher is executed.
+ */
+sdb_store_matcher_t *
+sdb_store_regex_matcher(sdb_store_expr_t *left, sdb_store_expr_t *right);
+
 /*
  * sdb_store_parse_object_type_plural:
  * Parse the type name (plural) of a stored object.