PreviousNext

Strings Representing Expressions

Strings are used to specify an SQL-like expression in a search operation. For example, consider the following:

(CN~=schmid) && (OCL=ORP || OCL=REP) && !(SN=ronnie)

This is used to search for anybody who is an organizational person or a residential person, whose name approximately matches schmid but whose surname is not ronnie.

Object identifiers can also be used instead of attribute abbreviations. The object identifier string is a series of numbers separated by dots.

All leading and trailing white space (surrounding the attribute types, the operators, and the attribute values) is ignored.

If spaces are part of the attribute value, then the complete attribute value must be enclosed in quotes.

Additionally, the presence of an attribute can also be tested in either of the following ways:

c = de && cn
c = de && cn = *

The following are the reserved characters:

' Used to indicate the start/end of an attribute value string. Can be used when spaces are part of the data. If this character is used, all other reserved characters within the quoted string except the backslash are not interpreted. An example follows:

OU=sni && cn='Henri Mueller' && tn=89989

/ Used to specify an attribute value with DN syntax. An example follows:

AON = {/c=de/o=sni/ou=ap22/cn=mayer}

= Used to associate the attribute with its value.

&& Used to logically AND two conditions.

|| Used to logically OR two conditions.

! Used to logically NEGATE a condition.

~= Used to specify phonetic matching during a search operation.

> Used to match values greater than a specified value.

>= Used to match values greater than or equal to a specified value.

< Used to match values less than a specified value.

<= Used to match values less than or equal to a specified value.

* Used to specify substrings during search.

( Used for nesting of filters.

) Used for nesting of filters.

{ Indicates the start of a structured attribute value block.

} Indicates the end of a structured attribute value block.

, Separates the components of a structured attribute. For example, TN=977999, CC=345, AB=8444 It can also be used to specify multiple AVAs in the case of attributes with DN syntax.

\xnn Used to specify hexadecimal data. The two characters nn are read as the hexadecimal value.

\ Used to escape any of the other reserved characters.

While evaluating complex expressions during search operations, the following precedence of operators prevail:

1. ( )

2. !

3. &&

4. ||

The ( ) operators have the highest precedence, and || the lowest.