PMEMKV  1.3-git75.g7bf0122
This is the C++ documentation for PMEMKV.
Namespaces | Classes | Typedefs | Enumerations | Functions
pmem::kv Namespace Reference

Main pmemkv namespace. More...

Namespaces

 internal
 internal pmemkv classes for C++ API
 

Classes

class  config
 Holds configuration parameters for engines. More...
 
class  db
 Main pmemkv class, it provides functions to operate on data in database. More...
 

Typedefs

using string_view = obj::string_view
 
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...
 
typedef int comparator_function(string_view key1, string_view key2)
 
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 pmemkv functions. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const status &s)
 

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

◆ comparator_function

typedef int pmem::kv::comparator_function(string_view key1, string_view key2)

◆ 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

◆ string_view

using pmem::kv::string_view = typedef obj::string_view

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)

COMPARATOR_MISMATCH 

db was created with a different comparator

Function Documentation

◆ operator<<()

std::ostream& pmem::kv::operator<< ( std::ostream &  os,
const status s 
)
inline