PMEMKV  1.1.1-git1.gb02004c
This is the C++ documentation for PMEMKV.
Classes | Typedefs | Enumerations
pmem::kv Namespace Reference

Main pmemkv namespace. More...

Classes

class  config
 Holds configuration parameters for engines. More...
 
class  db
 Main pmemkv class, it provides functions to operate on data in database. More...
 
class  string_view
 Our brief std::string_view implementation. More...
 

Typedefs

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 returned by pmemkv functions. More...
 

Detailed Description

Main pmemkv namespace.

It contains all pmemkv public types, enums, classes with their functions and members. It is located within pmem namespace.

Typedef Documentation

◆ get_kv_callback

using pmem::kv::get_kv_callback = typedef pmemkv_get_kv_callback

Key-value pair callback, C-style.

◆ get_kv_function

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.

Parameters
[in]keyreturned by callback item's key
[in]valuereturned by callback item's data

◆ get_v_callback

using pmem::kv::get_v_callback = typedef pmemkv_get_v_callback

Value-only callback, C-style.

◆ get_v_function

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.

Parameters
[in]valuereturned by callback item's data

Enumeration Type Documentation

◆ status

enum pmem::kv::status
strong

Status returned by pmemkv functions.

Each function, except for db::close() and pmem::kv::errormsg(), returns one of the following status codes.

Enumerator
OK 

no error

UNKNOWN_ERROR 

unknown error

NOT_FOUND 

record (or config item) not found

NOT_SUPPORTED 

function is not implemented by current engine

INVALID_ARGUMENT 

argument to function has wrong value

CONFIG_PARSING_ERROR 

parsing data to config failed

CONFIG_TYPE_ERROR 

config item has different type than expected

STOPPED_BY_CB 

iteration was stopped by user's callback

OUT_OF_MEMORY 

operation failed because there is not enough memory (or space on the device)

WRONG_ENGINE_NAME 

engine name does not match any available engine

TRANSACTION_SCOPE_ERROR 

an error with the scope of the libpmemobj transaction

DEFRAG_ERROR 

the defragmentation process failed (possibly in the middle of a run)