From: Allen, R. <ra...@ci...> - 2000-07-03 19:17:39
|
> From: Mark Wilcox [mailto:mew...@un...] > > It should be integrated into the search method via a control as it is > now. The purpose of controls is to enxtend or enhance the > functionality of a particular LDAP operation. I don't see the harm in having it as an extra option to the search method. Of course you'd want to keep the traditional control mechanism as it is today. The primary reason why I think this is a good idea is because many times, when developing automation processes around a directory, you want to be sure to get all objects that match a search, not what is imposed by the server limit. > The biggest problem with this is that it makes your life > easier because you have a paged controls on your LDAP Server. But my server > doesn't use paged controls, instead it supports the Virtual List View control. I was just using the Paged control as an example. The search method, could and probably should use VLV because of its acceptance. > In other words I think it's a bad idea because: > 1) it violates the idea behind the use of LDAP controls I don't see it as violating, I see it as integrating. > 2) it makes the API harder to use That is the whole reason why I think it should be added! You've seen the code to do paging or VLV, do you not think that it is hard? How about for the average joe, who doesn't know the in's and out's of LDAP? Do you think having an extra option to turn those features on would make the API harder to use? > 3) it makes the API less flexible I'm only proposing that a couple extra options are created which would turn on Paging or VLV. Not removing the current control functionality. I don't know how that would make the API any less flexible. > Now if you have a better idea about how to make controls work > & you can provide patches or code, I think we're all ears :). I gave examples of how it could be used below. If you want the actual code for how Net::LDAP::Search would be modified, I can do that as well, but I just wanted to get feedback first before I start devoting time to this. Robbie Allen > Mark > > On Sun, 2 Jul 2000, Allen, Robbie wrote: > > > Would it be feasible to merge the Paged control into the > search method? > > Generally when I do searches, I want all the entries > returned regardless > > of the server limit. In fact, some searches I do today will get all > > entries, because the number returned does not exceed the > server limit. > > One day that may not be the case. I could see it as either being > > integrated into the current search method's or even a separate one. > > > > $ldap->search( @args, > > paged => 1, > > pagesize => 1000); > > > > $ldap->search_paged( @args, > > pagesize => 1000 ); > > > > Comments? > > > > Robbie Allen > > > > > > > |