[fpc-devel] LocateNext
Alexandrov Alexandru
alexandru.alexandrov at gmail.com
Mon Apr 10 12:59:59 CEST 2006
On 4/10/06, Joost van der Sluis <joost at cnoc.nl> wrote:
> > > I'm busy implementing TBufDataset.Locate and friends. I had the idea to
> > > overload Locate like this:
> > >
> > > function Locate(const keyfields: string; const keyvalues: Variant;
> > > options: TLocateOptions; LocateNext : boolean ) : boolean;
> > >
> > > So that it's possible to doe a 'locatenext'
> > >
> > > But I saw that sqlite simply has a 'locatenext' function. But it is also
> > > possible to add a TLocateOption...
> >
> > There is no need to pass again keyfields, keyvalues and options
> > parameters to locate next match. What to do if they are not the same
> > as for first locate?
>
> I planned to give locatenext exactly the same parameters as locate
> itself. So you have to pass the same parameters again, but it adds some
> flexibility. For example if you're on a 'random' record, and want to
> locate the next one. Then you won't need to do a 'locate' first, but can
> do a locatenext immediately.
Then i suggest you to name that function LocateRest.
Both functions are useful.
Alex
More information about the fpc-devel
mailing list