Chapter 8. Db_multiset
Prev |  | Next

## Chapter 8. Db_multiset

This class is the combination of std::multiset and hash_multiset.

By setting database handles of DB_BTREE or DB_HASH type respectively, you will be using the equivalent of std::multiset or hash_multiset respectively. This container stores the key in the key element of a key/data pair in the underlying database, but doesn't store anything in the data element. Database and environment handle requirement: The requirement to these handles is the same as that to db_multimap .

#### See Also

db_multimap db_map db_container db_set

### Class Template Parameters

#### kdt

The key data type.

#### value_type_sub

If kdt is a class/struct type, do not specify anything in this parameter; Otherwise specify ElementHolder<kdt>.

#### Public Members

Member | Description
--- | ---
db_multiset | Create a std::multiset/hash_multiset equivalent associative container.
~db_multiset |
insert | Insert a single key if the key is not in the container.
erase | Erase elements by key.
operator= | Container content assignment operator.
swap | Swap content with another container.
operator== | Container content equality compare operator.
operator!= | Inequality comparison operator.

#### Group

Dbstl Container Classes

## db_multiset

### Function Details

    db_multiset(Db *dbp=NULL,
        DbEnv *envp=NULL)

Create a std::multiset/hash_multiset equivalent associative container.

See the handle requirement in class details to pass correct database/environment handles.

#### Parameters

##### dbp

The database handle.

##### envp

The database environment handle.

#### See Also

db_multimap(Db*, DbEnv*)

    db_multiset(Db *dbp, DbEnv *envp, InputIterator first,
        InputIterator last)

Iteration constructor.

Iterates between first and last, copying each of the elements in the range into this container. Create a std::multi/hash_multiset equivalent associative container. Insert a range of elements into the database. The range is [first, last), which contains elements that can be converted to type ddt automatically. This function supports auto-commit. See the handle requirement in class details to pass correct database/environment handles.

#### Parameters

##### dbp

The database handle.

##### envp

The database environment handle.

##### last

The open boundary of the range.

##### first

The closed boundary of the range.

#### See Also

db_multimap(Db*, DbEnv*, InputIterator, InputIterator)

    db_multiset(const self &x)

Copy constructor.

Create a database and insert all key/data pairs in x into this container. x's data members are not copied. This function supports auto-commit.

#### Parameters

##### x

The source container to initialize this container.

#### See Also

db_multimap(const db_multimap&) db_container(const db_container&)

### Class

db_multiset

Prev |  | Next
operator!= | Home | ~db_multiset