Closed AndreaLanfranchi closed 3 years ago
Suggestion ... can we get map flags being reported as result of txn.get_map_stat(...)
?
Basically: open dbi with MDBX_DB_ACCEDE
flag and get star, but for now "accede" not available in the C++
API.
But from my understanding MDBX_Accede inherits the flags of the already opened ENV. It has nothing to do with map flags. Also I want to create a clone of the table in the same DB (so accede is not relevant IMHO)
And get stat from map does not return creation flags (checked in core.c)
I'm on my way now and can't answer in detail. Briefly:
Sorry for delayed response
Yes sorry I have confused MDBX_ACCEDE
(which is env
related) with MDBX_DB_ACCEDE
(which is dbi related). To be honest the confusion is also due to the fact MDBX_DB_ACCEDE = MDBX_ACCEDE
whilest being in two different enums.
Thank you.
Just for reference it is possible to do this using C++ API
auto named_map{txn.open_map("whatever")};
auto info{txn.get_handle_info(named_map)};
Info struct contains both flags and two helper methods to get valuemode
and keymode
Though I think the question is pretty explicative here a scenario. Say I want to create a clone of a map (or bucket or table ... the naming is fancy) and I need to derive original
key_mode
andvalue_mode
so I can properly insert data in target. How can I do that ?