You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Mark Hayes <ma...@sleepycat.com> on 2004/04/20 06:09:48 UTC

Re: [bdbje] [rms] Getting the last value of a key with duplicates

Hi Alex,

On Apr 19, 2004, at 9:00 PM, Alex Karasulu wrote:

> Have not tried this yet but I used to use this technique with the old
> bdb.  I'm wondering if things have changed any in JE to do this with
> less effort.

Yes, that's the correct way to do it.  The Cursor getSearchKey(), 
getNextNoDup(), and getPrev() methods correspond to your three steps.  
And as you're probably aware, if getNextNoDup() returns NOTFOUND then 
you should call getLast() instead of getPrev().

Mark


RE: [bdbje] [rms] Getting the last value of a key with duplicates

Posted by Alex Karasulu <ao...@bellsouth.net>.
> -----Original Message-----
> From: Mark Hayes [mailto:mark@sleepycat.com]
> Sent: Tuesday, April 20, 2004 12:10 AM
> To: Alex Karasulu
> Cc: bdbje@sleepycat.com; 'Apache Directory Developers List'
> Subject: Re: [bdbje] [rms] Getting the last value of a key with duplicates
> 
> Yes, that's the correct way to do it.  The Cursor getSearchKey(),
> getNextNoDup(), and getPrev() methods correspond to your three steps.
> And as you're probably aware, if getNextNoDup() returns NOTFOUND then
> you should call getLast() instead of getPrev().

Thanks Mark its all coming back to me now.

	--Alex