Relative Content

Tag Archive for cberkeley-db

BerkelyDB (C API) delete a tuple based on a partial match using a single function

I’d like to know – is there a way to delete a tuple (key/value pair) from a BerkeleyDB btree database, by using a partial match, preferably using a single function call and without using a cursor – possibly some combination of flags in the db->del() incantation that I’m unaware of? I’d like to implement a ‘delete all’ function, like so (deletes everything starting with “foo”):