14.23. Slapi_Filter

Represents a search filter.
Syntax

 

#include "slapi-plugin.h" 
typedef struct slapi_filter Slapi_Filter;
Description

Slapi_Filter is the data type for an opaque structure that represents an search filter. (For more information on search filters, see Section 5.5, “Working with Entries, Attributes, and Values”.) The following table summarizes the front-end API functions that you can call to work with filters.

To ... ... Call this function
Determine if an entry matches a filter's criteria. slapi_filter_test()
Get the filter type. slapi_filter_get_choice()
Get the attribute type and value used for comparison in a filter (only applicable to LDAP_FILTER_EQUALITY, LDAP_FILTER_GE, LDAP_FILTER_LE, and LDAP_FILTER_APPROX searches). slapi_filter_get_ava()
Get the type of attribute that the filter is searching for (only applicable to LDAP_FILTER_PRESENT searches). slapi_filter_get_type()
Get the substring pattern used for the filter (applicable only to LDAP_FILTER_SUBSTRING searches). slapi_filter_get_subfilt()
Convert a string representation of a filter to a filter of the data type Slapi_Filter. slapi_str2filter()
Construct a new LDAP_FILTER_AND, LDAP_FILTER_OR, or LDAP_FILTER_NOT filter from other filters. slapi_filter_join()
Get the components of a filter (only applicable to LDAP_FILTER_AND, LDAP_FILTER_OR, and LDAP_FILTER_NOT searches). slapi_filter_list_first()
Free a filter from memory. slapi_filter_free()