Next: , Previous: , Up: Functions   [Contents][Index]


4.2 Operations on result sets

The functions below take result set descriptor as their first argument (rd), returned by a previous call to search. If the descriptor does not refer to a valid result set, they raise the e_range exception.

Function: string search_result_dn (number rd)

Returns DN of the returned LDAP object.

Function: number search_result_count_entries (number rd)

Returns count of entries in the result.

Function: boolean search_result_next_entry (number rd)

Selects the next entry in the result set.

The function returns true (1) on success and false (0) if all entries in the result set have already been visited.

Function: number search_result_count_attrs (number rd)

Returns number of attributes available in each entry of the result set rd.

Function: string search_result_attr_name (number rd, number n)

Returns name of the nth attribute in the result set rd.

If n is negative or is greater than the actual number of attributes, the e_range exception is raised.

Function: number search_result_attr_value_count (number rd, string attr)

Returns number of values for the attribute attr in the current entry of the result set rd.

Function: string search_result_attr_value_get (number rd, string attr, number n)

Retrieves nth value of the attribute attr from the current entry of the result set rd.

If n is negative or is greater than the actual number of values retrieved for that attribute (as reported by search_result_attr_value_count), the e_range exception is raised.