C++ edjLibrary SDK
Loading...
Searching...
No Matches
kv.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string>
5#include <vector>
6
7#include "error.hpp"
8
9namespace edjx {
10
12namespace kv {
13
23 std::vector<uint8_t> & result,
24 const std::string & key
25 );
26
36 const std::string & key,
37 const std::vector<uint8_t> & val
38 );
39
49 const std::string & key,
50 const std::string & val
51 );
52
63 const std::string & key,
64 const std::vector<uint8_t> & val,
65 uint64_t ttl
66 );
67
78 const std::string & key,
79 const std::string & val,
80 uint64_t ttl
81 );
82
90 edjx::error::KVError remove(const std::string & key);
91
92}}
KVError
Enum describing return values of functions that correspond to kv modules.
Definition: error.hpp:98
edjx::error::KVError remove(const std::string &key)
Removes an entry from the KV store.
edjx::error::KVError get(std::vector< uint8_t > &result, const std::string &key)
Returns the value associated with the provided key.
edjx::error::KVError put(const std::string &key, const std::vector< uint8_t > &val)
Inserts a key-value pair into the KV store.
Definition: error.hpp:5