X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fstore_lookup.c;h=325d67f157af587294d44e5480624d702c5bc075;hb=2854b039898a32f1f4cc366dda97e3a3566529b3;hp=cb3629c89eff652d34721e33bac763415a208bf0;hpb=26e53bce7d3f75e7dabed7238ca946e2c230ae3c;p=sysdb.git diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index cb3629c..325d67f 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -1242,6 +1242,28 @@ sdb_store_isnull_matcher(const char *attr_name) MATCHER_ISNULL, attr_name)); } /* sdb_store_isnull_matcher */ +sdb_store_matcher_op_cb +sdb_store_parse_matcher_op(const char *op) +{ + if (! strcasecmp(op, "<")) + return sdb_store_cmp_lt; + else if (! strcasecmp(op, "<=")) + return sdb_store_cmp_le; + else if (! strcasecmp(op, "=")) + return sdb_store_cmp_eq; + else if (! strcasecmp(op, "!=")) + return sdb_store_cmp_ne; + else if (! strcasecmp(op, ">=")) + return sdb_store_cmp_ge; + else if (! strcasecmp(op, ">")) + return sdb_store_cmp_gt; + else if (! strcasecmp(op, "=~")) + return sdb_store_regex_matcher; + else if (! strcasecmp(op, "!~")) + return sdb_store_nregex_matcher; + return NULL; +} /* sdb_store_parse_matcher_op */ + int sdb_store_parse_object_type_plural(const char *name) {