2

I have a MapDB with multiple HashMaps.

 DBMaker.Maker mapmk = DBMaker.fileDB (this.dbfile);
 DB mapdb = mapmk.make ();

 HTreeMap <String, String> map1 = mapdb.hashMap ("abc").createOrOpen ();
 map1.put("max", "123");

 HTreeMap <String, String> map2 = mapdb.hashMap ("def").createOrOpen ();
 map2.put("sam", "098");

 HTreeMap <String, String> map3 = mapdb.hashMap ("ghi").createOrOpen ();

How can I remove a whole map (e.g. map2 = "def") with all its key/value-pairs from the DB?

chris01
  • 10,921
  • 9
  • 54
  • 93
  • Which version are you using ? – Anish B. May 30 '20 at 17:18
  • 1
    Version is 3.0.8 – chris01 May 30 '20 at 18:05
  • The 3.0.8 code for the [DB class](https://github.com/jankotek/mapdb/blob/mapdb-3.0.8/src/main/java/org/mapdb/DB.kt#L30) contains the following comments: //TODO consistency lock //TODO rename nemed object //TODO delete named object //TOOD metrics logger so apparently you cannot delete a named object/map in the v3 codebase yet. It did exist in version 2. – Markus Döring Feb 20 '23 at 20:36

0 Answers0