FindEQ (LDAP function): Difference between revisions
m (moved FindEQ (Ldap function) to FindEQ (LDAP function)) |
m (moved FindEQ (Ldap function) to FindEQ (LDAP function)) |
||
Line 1: | Line 1: | ||
{{Template:LDAP:FindEQ subtitle}} | |||
This [[Notation conventions for methods#Callable methods|callable]] function | This [[Notation conventions for methods#Callable methods|callable]] function | ||
Line 20: | Line 15: | ||
</ul> | </ul> | ||
==Syntax== | ==Syntax== | ||
{{Template:LDAP:FindEQ syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 40: | Line 31: | ||
<tr><th>-4 </th><td>Response message contains ill-formed (unexpected) data</td></tr> | <tr><th>-4 </th><td>Response message contains ill-formed (unexpected) data</td></tr> | ||
<tr><th><i><b>%ld</b></i></th><td>An <var>Ldap</var> object variable.</td></tr> | <tr><th><i><b>%ld</b></i></th><td>An <var>Ldap</var> object variable.</td></tr> | ||
<tr><th><i><b>attrib</b></i></th><td>The name (sometimes called “type”) of the entry attribute you want to key the directory search. You use the ''searchString'' argument to specify the attribute value, and <var>FindEQ</var> searches the directory for entries that satisfy the ''attrib''=''searchString'' condition. | <tr><th><i><b>attrib</b></i></th><td>The name (sometimes called &ldquo;type&rdquo;) of the entry attribute you want to key the directory search. You use the ''searchString'' argument to specify the attribute value, and <var>FindEQ</var> searches the directory for entries that satisfy the ''attrib''=''searchString'' condition. | ||
Some traditionally supported attribute names include the following, but note that servers are '''not''' required to support them. For more about the standard attribute names, see [[LDAP overview#rfc2256|"RFC 2256"]]. | Some traditionally supported attribute names include the following, but note that servers are '''not''' required to support them. For more about the standard attribute names, see [[LDAP overview#rfc2256|"RFC 2256"]]. | ||
Line 67: | Line 58: | ||
<tr><th><var>AttributesOnly</var></th> | <tr><th><var>AttributesOnly</var></th> | ||
<td>This <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration is an optional but [[Notation conventions for methods#Named parameters|name required]] parameter. If set to <code>True</code>, <var>FindEQ</var> still retrieves the entries that satisfy the search condition, | <td>This <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration is an optional but [[Notation conventions for methods#Named parameters|name required]] parameter. If set to <code>True</code>, <var>FindEQ</var> still retrieves the entries that satisfy the search condition, | ||
but it returns only the names (also called “types”) of the available entry attributes, not their associated values. | but it returns only the names (also called &ldquo;types&rdquo;) of the available entry attributes, not their associated values. | ||
If you omit this parameter, its default setting is <code>False</code>. If you specify a value, you must include the parameter name. </td></tr> | If you omit this parameter, its default setting is <code>False</code>. If you specify a value, you must include the parameter name. </td></tr> | ||
Line 81: | Line 72: | ||
<p class="code"> BaseObject='dc=hawaii,dc=edu' | <p class="code"> BaseObject='dc=hawaii,dc=edu' | ||
</p> | </p> | ||
Such a string may be required by your target LDAP server to provide an LDAP base “distinguished name,” which ensures that the entries your search string locates are unique. | Such a string may be required by your target LDAP server to provide an LDAP base &ldquo;distinguished name,&rdquo; which ensures that the entries your search string locates are unique. | ||
<var>BaseObject</var> is available as of <var class="product">Sirius Mods</var> version 6.8.</td></tr> | <var>BaseObject</var> is available as of <var class="product">Sirius Mods</var> version 6.8.</td></tr> | ||
</table> | </table> | ||
==Usage | ==Usage notes== | ||
In addition to the following notes, see [[LDAP Helper#Using the Find methods|"Using the Find methods"]]. | In addition to the following notes, see [[LDAP Helper#Using the Find methods|"Using the Find methods"]]. | ||
Line 175: | Line 166: | ||
</result> | </result> | ||
</p> | </p> | ||
==See also== | |||
{{Template:LDAP:FindEQ footer}} |
Revision as of 22:54, 8 July 2011
Retrieve matching records from the LDAP directory (LDAP class)
This callable function
retrieves all records (entries) from the LDAP directory
that satisfy the criterion
attributeType=searchString
(for example, cn=Albert Einstein
), where:
- attributeType is one of the entry attribute types defined in the target LDAP server.
- searchString is a string, which may include blanks and special characters.
- The attribute type and search string are separate FindEQ arguments you must explicitly specify.
Syntax
[%number =] ldap:FindEQ( attrib, searchString, doc, - [AttributesOnly= boolean], - [ReturnAttributes= stringlist], [BaseObject= string])
Syntax terms
%st | A float variable to contain the operational status result of the method. A zero indicates that the method operation succeeded; a negative value indicates an error, which may or may not be in the client code. More specific information about the
If the client is the source of the error, or no server error information is available, ErrorNumber may be the same as %st, or it may be set harmlessly to 0, and ErrorText is likely to contain explanatory information for the If the server reports an error, the ErrorNumber property is set to that number, which is likely to differ from %st, and the ErrorText value will contain whatever information about the server error is available. Possible %st values are:
Usage notesIn addition to the following notes, see "Using the Find methods".
ExampleAgainst a test LDAP server,
the following FindEQ statement does a search of %st = %ld:FindEQ('cn', 'sildar john', %doc, - AttributesOnly=TRUE) The <result> <entry objectName="cn: Sildar, John R, id=X479, o=Boston University, c=US"> <cn/> <sn/> <givenname/> <postaladdress/> <title/> <o/> <telephonenumber/> <objectclass/> <l/> <st/> <c/> </entry> </result> See also |
---|