I am using LdapContext in java to query an LDAP server (I think the server is Sun server version 5.2). I use the LdapContext.search (String name, String filter, SearchControls cons) method for regular queries, but I don’t know how to execute a query equivalent to sql "select count (*)". Any ideas? Performance is important, so I don’t just want to run a regular query and count the results.
I do not believe that there is an equivalent to the function "select count (*)" in SQL.
I think you will need to get the results of your query in some data structure and count the number of nodes there.
, LDAP , , LDAP, , - , .
Context.list(String name)? , .