insert(const value_type &x)
Insert a single key/data pair if the key is not in the container.
A pair P, if insert OK, i.e. the inserted key wasn't in the container, P.first will be the iterator sitting on the inserted key/data pair, and P.second is true; otherwise P.first is an invalid iterator and P.second is false.
iterator insert(iterator position, const value_type &x)
Insert with hint position.
We ignore the hint position because Berkeley DB knows better where to insert.
The iterator sitting on the inserted key/data pair, or an invalid iterator if the key was already in the container.
void insert(const db_map_base_iterator< kdt, realddt, ddt > &first, const db_map_base_iterator< kdt, realddt, ddt > &last)
Range insertion.
Insert a range [first, last) of key/data pairs into this container.
void insert(InputIterator first, InputIterator last)
Range insertion.
Insert a range [first, last) of key/data pairs into this container.
They have similiar usage as their C++ STL equivalents.
Note that when secondary index is enabled, each db_container can create a db_multimap secondary container, but the insert function is not functional for secondary containers.