LLFIO  v2.00
kvstore.hpp File Reference

Provides the abstract interface for a key-value store. More...

#include "../llfio/v2.0/file_handle.hpp"
#include "quickcpplib/memory_resource.hpp"

Classes

struct  kvstore_v1_xxx::traits::is_trivially_attachable< T >
 True if a type is trivially attachable i.e. requires no extra work to attach. More...
 
struct  kvstore_v1_xxx::traits::is_attachable< T, AttachResultType >
 True if a type is trivially attachable, or has defined an ADL discovered free function of the form span<byte> in_place_attach<T>(span<byte>). More...
 
struct  kvstore_v1_xxx::traits::is_trivially_detachable< T >
 True if a type is trivially detachable i.e. requires no extra work to detach. More...
 
struct  kvstore_v1_xxx::traits::is_detachable< T, DetachResultType >
 True if a type is trivially detachable, or has defined an ADL discovered free function of the form span<byte> in_place_detach<T>(span<byte>). More...
 
struct  kvstore_v1_xxx::basic_key_value_store_info
 Information about an available key value store implementation. More...
 
class  kvstore_v1_xxx::basic_key_value_store
 A possibly hardware-implemented basic key-value store. More...
 
class  kvstore_v1_xxx::basic_key_value_store::transaction
 

Namespaces

 kvstore_v1_xxx
 The kv store namespace.
 
 kvstore_v1_xxx::traits
 Traits.
 

Macros

#define KVSTORE_V1   (QUICKCPPLIB_BIND_NAMESPACE_VERSION(kvstore_v1))
 The namespace configuration of this kv store v1. Consists of a sequence of bracketed tokens later fused by the preprocessor into namespace and C++ module names.
 
#define KVSTORE_V1_NAMESPACE   kvstore_v1_xxx
 The namespace of this kv store v1 which will be some unknown inline namespace starting with v1_ inside the kvstore namespace.
 
#define KVSTORE_V1_NAMESPACE_BEGIN
 Expands into the appropriate namespace markup to enter the kv store v1 namespace. More...
 
#define KVSTORE_V1_NAMESPACE_EXPORT_BEGIN
 Expands into the appropriate namespace markup to enter the C++ module exported kv store v1 namespace. More...
 
#define KVSTORE_V1_NAMESPACE_END   }
 Expands into the appropriate namespace markup to exit the kv store v1 namespace.
 

Typedefs

template<class T >
using kvstore_v1_xxx::span = llfio::span< T >
 
template<class T >
using kvstore_v1_xxx::result = llfio::result< T >
 
template<template< class... > class T, class... Ts>
using kvstore_v1_xxx::traits::detail::test_apply = impl::test_apply< T, impl::types< Ts... > >
 
template<class T , class... Args>
using kvstore_v1_xxx::traits::detail::get_attach_result = decltype(_do_attach_object_instance(std::declval< T >(), std::declval< Args >()...))
 
template<class... Args>
using kvstore_v1_xxx::traits::detail::safe_get_attach_result = test_apply< get_attach_result, Args... >
 
template<class T , class... Args>
using kvstore_v1_xxx::traits::detail::get_detach_result = decltype(_do_detach_object_instance(std::declval< T >(), std::declval< Args >()...))
 
template<class... Args>
using kvstore_v1_xxx::traits::detail::safe_get_detach_result = test_apply< get_detach_result, Args... >
 

Enumerations

enum class  kvstore_v1_xxx::kvstore_errc {
  success = 0 , kvstore_v1_xxx::invalid_uri , kvstore_v1_xxx::unsupported_uri , kvstore_v1_xxx::unsupported_integrity ,
  kvstore_v1_xxx::transaction_aborted_collision
}
 

Functions

template<class T , class... Args>
span< byte > kvstore_v1_xxx::traits::detail::_do_attach_object_instance (T &, span< byte > b)
 
template<class T , class... Args>
span< byte > kvstore_v1_xxx::traits::detail::_do_detach_object_instance (T &, span< byte > b)
 
result< basic_key_value_store > kvstore_v1_xxx::create_kvstore (const basic_key_value_store::uri_type &uri, basic_key_value_store::size_type key_size, basic_key_value_store::features _features, basic_key_value_store::mode _mode=basic_key_value_store::mode::write, basic_key_value_store::creation _creation=basic_key_value_store::creation::if_needed, basic_key_value_store::caching _caching=basic_key_value_store::caching::all)
 Create a new key value store, or open or truncate an existing key value store, using the given URI. More...
 
result< basic_key_value_store > kvstore_v1_xxx::open_kvstore (const basic_key_value_store::uri_type &uri, basic_key_value_store::mode _mode=basic_key_value_store::mode::write, basic_key_value_store::caching _caching=basic_key_value_store::caching::all)
 Open an existing key value store. A convenience overload for create_kvstore().
 
result< span< basic_key_value_store_info > > kvstore_v1_xxx::enumerate_kvstores (span< basic_key_value_store_info > lst)
 Fill an array with information about all the key value stores available to this process.
 

Detailed Description

Provides the abstract interface for a key-value store.