![]() |
void insert( void const* key, void const* data, nsize_t bytes, error_code& ec);
This function attempts to insert the specified key/value pair into the
database. If the key already exists, ec
is set to key_exists.
If an error occurs, ec
is set to the corresponding error.
The database must be open.
Safe to call concurrently with any function except basic_store::close.
If the implementation encounters an error while committing data to the
database, this function will immediately return with ec
set to the error which occurred. All subsequent calls to basic_store::insert will return the same error
until the database is closed.
|
Name |
Description |
|---|---|
|
|
A buffer holding the key to be inserted. The size of the buffer
should be at least the |
|
|
A buffer holding the value to be inserted. |
|
|
The size of the buffer holding the value data. This value must be greater than 0 and no more than 0xffffffff. |
|
|
Set to the error, if any occurred. |