Code

store: Add sdb_store_query_prepare().
[sysdb.git] / src / core / store_lookup.c
index 18a0235536e3f154128ff576cbc624c9dfa49a5f..4862905b3366d4fa4455a95ddc80a5bedd8ee652 100644 (file)
@@ -352,6 +352,8 @@ matchers[] = {
        match_cmp,
        match_regex,
        match_regex,
+
+       NULL, /* QUERY */
 };
 
 /*
@@ -744,6 +746,8 @@ sdb_store_matcher_matches(sdb_store_matcher_t *m, sdb_store_obj_t *obj,
        if ((m->type < 0) || ((size_t)m->type >= SDB_STATIC_ARRAY_LEN(matchers)))
                return 0;
 
+       if (! matchers[m->type])
+               return 0;
        return matchers[m->type](m, obj, filter);
 } /* sdb_store_matcher_matches */