![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi The BerkeleyDB documentation for Dbc.get with DB_SET_RANGE flag states that: Db.DB_SET_RANGE The Db.DB_SET_RANGE flag is identical to the Db.DB_SET flag, except that in the case of the Btree access method, the key is returned as well as the data item and the returned key/data pair is the smallest key greater than or equal to the specified key (as determined by the comparison method), permitting partial key matches and range searches. So, in my understanding, the DB_SET_RANGE combines two functions in the same call: 1/ It positions the cursor on the smallest key greater that or equal to the specified key. 2/ It returns also the key/data corresponding to the relevant key AND advances the cursor to the next key. |
|
It there a way with DBD to have each function in separate calls i.e, First call: having Dbc.get(Db.SET_RANGE) to only position the cursor without returning the key/data AND NOT advancing the cursor to the next key (one call) Second call: and let the Dbc.get(Db.DB_NEXT) getting the key/data and avancing the cursor (one call)??? Regards Francis ANDRE |
#3
| |||
| |||
|
|
So, in my understanding, the DB_SET_RANGE combines two functions in the same call: 1/ It positions the cursor on the smallest key greater that or equal to the specified key. 2/ It returns also the key/data corresponding to the relevant key AND advances the cursor to the next key. |
![]() |
| Thread Tools | |
| Display Modes | |
| |