M Gurschi wrote: > Hello Howard, >=20 > Tell me please, after *mdb_cursor_get(key, data, MDB_SET_RANGE)*, if i = want to consume the key, if i understand correctly the key will be update= d (on success). Will the reference to data also be updated or do i need t= o do: > *mdb_cursor_get(key, data, MDB_GET_CURRENT)* to get data to point at th= e data from the key? That would be a useless behavior for the API if it required that, wouldn'= t it. >=20 > Kind Regards, > Maxim Gurschi >=20 > On 1 Feb 2024, at 20:21, M Gurschi wrote: >=20 > =EF=BB=BFUnderstood, thank you! >=20 > Kind Regards, > Maxim Gurschi >=20 > On 1 Feb 2024, at 17:53, Howard Chu wrote: >=20 > =EF=BB=BFM Gurschi wrote: >> Hello team, >> >> Can you please let me know, when using *mdb_cursor_get* with *MDB_SET*= operation, in case the key is not present in the db, where is the cursor= left pointing? >> >> My scenario is that i want to retrieve two adjacent keys. >> >> 1. first *mdb_cursor_get* with *MDB_SET*=20 >> 2. after that, *mdb_cursor_get* with *MDB_NEXT*=20 >> >> I'm wondering what can i expect the cursor to point at in case the key= is not found in step 1. >=20 > You cannot expect anything in particular. >=20 > Use MDB_SET_RANGE instead. >=20 --=20 -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/