PMEMKV
1.4.1-git1.g7db5b8f
This is the C++ documentation for PMEMKV.
|
Main pmemkv namespace. More...
Namespaces | |
internal | |
Internal pmemkv classes for C++ API. | |
Classes | |
class | bad_result_access |
Defines a type of object to be thrown by result::get_value() when result doesn't contain value. More... | |
class | config |
Holds configuration parameters for engines. More... | |
class | db |
Main pmemkv class, it provides functions to operate on data in database. More... | |
class | result |
Stores result of an operation. It always contains status and optionally can contain value. More... | |
class | tx |
Pmemkv transaction handle. More... | |
Typedefs | |
using | string_view = obj::string_view |
Partial string_view implemenetation, defined in pmem::obj namespace in libpmemobj-cpp library (see: https://pmem.io/libpmemobj-cpp ). More... | |
typedef int | get_kv_function(string_view key, string_view value) |
The C++ idiomatic function type to use for callback using key-value pair. More... | |
typedef void | get_v_function(string_view value) |
The C++ idiomatic function type to use for callback using only the value. More... | |
using | get_kv_callback = pmemkv_get_kv_callback |
Key-value pair callback, C-style. More... | |
using | get_v_callback = pmemkv_get_v_callback |
Value-only callback, C-style. More... | |
Enumerations | |
enum | status { status::OK = PMEMKV_STATUS_OK, status::UNKNOWN_ERROR = PMEMKV_STATUS_UNKNOWN_ERROR, status::NOT_FOUND = PMEMKV_STATUS_NOT_FOUND, status::NOT_SUPPORTED = PMEMKV_STATUS_NOT_SUPPORTED, status::INVALID_ARGUMENT = PMEMKV_STATUS_INVALID_ARGUMENT, status::CONFIG_PARSING_ERROR, status::CONFIG_TYPE_ERROR, status::STOPPED_BY_CB = PMEMKV_STATUS_STOPPED_BY_CB, status::OUT_OF_MEMORY, status::WRONG_ENGINE_NAME, status::TRANSACTION_SCOPE_ERROR, status::DEFRAG_ERROR = PMEMKV_STATUS_DEFRAG_ERROR, status::COMPARATOR_MISMATCH } |
Status returned by most of pmemkv functions. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, const status &s) |
Provides string representation of a status, along with its number as specified by enum. More... | |
template<typename T > | |
bool | operator== (const result< T > &lhs, const status &rhs) |
template<typename T > | |
bool | operator== (const status &lhs, const result< T > &rhs) |
template<typename T > | |
bool | operator!= (const result< T > &lhs, const status &rhs) |
template<typename T > | |
bool | operator!= (const status &lhs, const result< T > &rhs) |
Main pmemkv namespace.
It contains all pmemkv public types, enums, classes with their functions and members. It is located within pmem namespace.
using pmem::kv::get_kv_callback = typedef pmemkv_get_kv_callback |
Key-value pair callback, C-style.
typedef int pmem::kv::get_kv_function(string_view key, string_view value) |
The C++ idiomatic function type to use for callback using key-value pair.
[in] | key | returned by callback item's key |
[in] | value | returned by callback item's data |
using pmem::kv::get_v_callback = typedef pmemkv_get_v_callback |
Value-only callback, C-style.
typedef void pmem::kv::get_v_function(string_view value) |
The C++ idiomatic function type to use for callback using only the value.
It is used only by non-range get() calls.
[in] | value | returned by callback item's data |
using pmem::kv::string_view = typedef obj::string_view |
Partial string_view implemenetation, defined in pmem::obj namespace in libpmemobj-cpp library (see: https://pmem.io/libpmemobj-cpp ).
|
strong |
Status returned by most of pmemkv functions.
Most of functions in libpmemkv API return one of the following status codes.
Status returned from a function can change in a future version of a library to a more specific one. For example, if a function returns status::UNKNOWN_ERROR, it is possible that in future versions it will return status::INVALID_ARGUMENT. Recommended way to check for an error is to compare status with status::OK (see pmem::kv::db basic example).
|
inline |
Provides string representation of a status, along with its number as specified by enum.
It's useful for debugging, e.g. with pmem::db::errormsg()