[pybsddb] Deleting a specific key/data pair in a database with duplicate keys

denis.papathanasiou at gmail.com denis.papathanasiou at gmail.com
Mon Dec 8 18:21:18 CET 2008


Will Weisser wrote:
> To answer your question, I believe what you want to do is use a cursor and
> either get_both() or use get() followed by next() to move to the item you
> want, then call delete() to delete the item currently referenced by the
> cursor.

Yes, DBCursor.get_both(key, data) followed by DBCursor.delete() did the
trick.

Thanks for pointing this out.

> However, Berkeley DB itself is very well supported on the Oracle technet
> forums; I've asked some questions there and gotten prompt answers there from
> sleepycat staff.

I didn't realize Oracle maintained a forum for Berkeley DB; I only
checked usenet (comp.databases.berkeley-db) and found it inactive.



More information about the pybsddb mailing list