Everett
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
everett::sqlite_catalog< P, Ops > Struct Template Reference

#include <sqlite_catalog.h>

Classes

struct  cola_pair_descriptor
 
struct  cola_pair_files
 
struct  prepared_cola_pair
 

Public Types

enum struct  private_scope_state { missing , active , released }
 
using policy_type = P
 
using operation_type = catalog_operation
 

Public Member Functions

 sqlite_catalog (sqlite_catalog const &)=delete
 
sqlite_catalog & operator= (sqlite_catalog const &)=delete
 
 sqlite_catalog (sqlite_catalog &&other) noexcept
 
sqlite_catalog & operator= (sqlite_catalog &&)=delete
 
 ~sqlite_catalog ()
 
bool poisoned () const noexcept
 
bool private_construction () const noexcept
 
unsigned schema_version () const noexcept
 
std::filesystem::path const & root () const &noexcept
 
std::filesystem::path const & root () const &&=delete
 
object_id const & identity () const &
 
object_id const & identity () const &&=delete
 
void begin_private_scope (std::string_view op, object_id const &id)
 
void set_private_scope (object_id const &id)
 
void release_private_scope (std::string_view op, object_id const &id)
 
private_scope_state scope_state (object_id const &id) const
 
std::vector< object_id > private_scopes () const
 
object_seal_receipt sealed_receipt (object_id const &id, file_kind expected) const
 
void verify_sealed (object_seal_receipt const &receipt, file_kind expected) const
 
std::optional< catalog_operation > lookup_operation (std::string_view op) const
 
std::optional< blob_identity > find_save (std::string_view name) const
 
void reserve (std::string_view op, object_attempt_id const &attempt, std::string_view owner, std::span< blob_identity const > inputs, std::span< catalog_object_reservation const > outputs)
 
void record_sealed (std::string_view op, object_seal_receipt const &receipt)
 
void record_native_merge (std::string_view op, catalog_native_merge const &key, object_seal_receipt const &receipt, std::string_view owner)
 
std::optional< object_seal_receipt > acquire_native_merge (std::string_view op, catalog_native_merge const &key, std::string_view owner)
 
void register_chain (std::string_view op, mapped_query_root< P > const &source, catalog_admission admission=catalog_admission::trusted)
 
void register_chain (std::string_view op, mapped_cola_query_root< P > const &source, catalog_admission admission=catalog_admission::trusted)
 
template<class Mapped >
void register_graph (std::string_view op, std::shared_ptr< Mapped const > const &source, catalog_admission admission=catalog_admission::trusted)
 
template<class Mapped >
void register_graphs (std::string_view op, std::span< std::shared_ptr< Mapped const > const > roots, catalog_admission admission=catalog_admission::trusted)
 
template<class Mapped >
void register_pair (std::string_view op, blob_identity const &id)
 
template<class Mapped >
auto seal_pair (std::string_view op, blob_identity const &id, object_seal_receipt const &receipt)
 
template<class Mapped >
auto seal_native_pair (std::string_view op, blob_identity const &id, object_seal_receipt const &native_receipt, object_seal_receipt const &index_receipt)
 
void save (std::string_view op, std::string_view name, blob_identity const &head)
 
catalog_saved_root acquire_save (std::string_view op, std::string_view name, std::string_view reader_owner)
 
std::optional< catalog_timeline_head > find_timeline (std::string_view name) const
 
catalog_timeline_head create_timeline (std::string_view op, std::string_view name, blob_identity const &head)
 
catalog_timeline_head fork_timeline (std::string_view op, std::string_view name, catalog_timeline_head const &source)
 
catalog_timeline_publication publish_timeline (std::string_view op, catalog_timeline_head const &expected, blob_identity const &candidate)
 
std::optional< catalog_session_head > find_session (std::string_view name) const
 
catalog_session_head create_session (std::string_view op, std::string_view name, blob_identity const &head, std::span< std::byte const > checkpoint, catalog_auxiliary_roots auxiliary={})
 
catalog_session_publication publish_session (std::string_view op, catalog_session_head const &expected, blob_identity const &candidate, std::span< std::byte const > checkpoint, catalog_auxiliary_roots auxiliary={})
 
catalog_session_head fork_session (std::string_view op, std::string_view name, catalog_session_head const &source)
 
void save_session (std::string_view op, std::string_view name, catalog_session_head const &source)
 
std::optional< catalog_session_head > find_saved_session (std::string_view name) const
 

Static Public Member Functions

static sqlite_catalog create (std::filesystem::path const &root, object_id const &identity, catalog_options options={}, Ops ops={})
 
static sqlite_catalog create_cola (std::filesystem::path const &root, object_id const &identity, catalog_options options={}, Ops ops={})
 
static sqlite_catalog create_sessions (std::filesystem::path const &root, object_id const &identity, catalog_options options={}, Ops ops={})
 
static sqlite_catalog open (std::filesystem::path const &root, catalog_options options={}, Ops ops={})
 
static char const * runtime_version () noexcept
 
static char const * source_id () noexcept
 

Private Member Functions

mapped_slice open_object_bytes (object_id const &id, file_kind expected) const
 
template<class Mapped >
prepared_cola_pair< Mapped > prepare_cola_pair (blob_identity const &id, object_seal_receipt const *receipt=nullptr, object_seal_receipt const *native_receipt=nullptr) const
 
void append_seal_request (catalog_detail::bytes &request, object_seal_receipt const &receipt, std::filesystem::path const &path) const
 
void record_sealed_row (object_seal_receipt const &receipt, std::filesystem::path const &path, mapped_slice const *evidence=nullptr)
 
void record_prepared_seal (object_seal_receipt const &receipt, file_kind expected)
 
void write_seal (object_seal_receipt const &receipt)
 
void register_cola_row (cola_pair_descriptor const &value)
 
void insert_cola_row (cola_pair_descriptor const &value)
 
 sqlite_catalog (sqlite3 *db, std::filesystem::path root, Ops ops)
 
void require_active () const
 
void require_timelines () const
 
void require_sessions () const
 
bool has_table (std::string_view table) const
 
catalog_timeline_head decode_timeline (catalog_detail::bytes const &bytes) const
 
catalog_session_head decode_session (catalog_detail::bytes const &bytes) const
 
std::optional< catalog_detail::bytes > checkpoint_at (std::string_view name, std::uint64_t generation) const
 
catalog_session_head attach_checkpoint (catalog_timeline_head head) const
 
catalog_auxiliary_roots auxiliary_at (catalog_timeline_head const &head) const
 
void add_auxiliary (std::string_view kind, std::string_view owner, catalog_auxiliary_roots const &value)
 
std::optional< catalog_timeline_head > timeline_at (std::string_view name, std::optional< std::uint64_t > generation={}) const
 
void require_prepared (blob_identity const &head) const
 
catalog_timeline_head add_generation (std::string_view name, std::uint64_t generation, blob_identity const &head)
 
catalog_session_head add_session_generation (std::string_view name, std::uint64_t generation, blob_identity const &head, std::span< std::byte const > checkpoint, catalog_auxiliary_roots const &auxiliary)
 
template<class F >
auto read (F &&action) const
 
void definition (std::string_view type, std::string_view name, std::string_view expected) const
 
unsigned detect_schema_version () const
 
void validate_schema () const
 
std::optional< object_id > native_merge_output (std::span< std::byte const > domain, catalog_native_merge const &key) const
 
void validate_native_merges () const
 
void ensure_private_scopes ()
 
void validate_private_scopes () const
 
void require_private_scope (object_id const &id) const
 
void add_native_pin (std::string_view owner, object_id const &native)
 
void add_owner (std::string_view kind, std::string_view name)
 
void add_root (std::string_view kind, std::string_view owner, blob_identity const &pair)
 
void require_sealed (object_id const &id, file_kind expected, mapped_slice const *evidence=nullptr) const
 
void verify_object_envelope (object_id const &id, file_kind expected, std::uint64_t size, std::uint64_t crc) const
 
template<class F >
catalog_detail::bytes transaction (std::string_view op, std::string_view kind, catalog_detail::bytes const &request, F &&apply, bool record=true)
 

Static Private Member Functions

static void append_pair_request (catalog_detail::bytes &request, cola_pair_descriptor const &descriptor)
 
static sqlite_catalog create_version (std::filesystem::path const &root, object_id const &identity, catalog_options options, Ops ops, unsigned version)
 
static void validate_timeline (catalog_timeline_head const &value)
 
static std::int64_t kind (file_kind value)
 
static catalog_detail::bytes policy ()
 
static bool compatible_policy (std::span< std::byte const > stored)
 
static void validate_options (catalog_options options)
 
static sqlite_catalog connect (std::filesystem::path const &root, catalog_options options, Ops ops, bool initialize=false)
 
static catalog_detail::bytes native_merge_domain (catalog_native_merge const &key)
 
static void append_native_merge (catalog_detail::bytes &out, std::span< std::byte const > domain, catalog_native_merge const &key)
 
static void check_object_envelope (file_kind expected, std::uint64_t size, std::uint64_t crc, std::span< std::byte const > bytes)
 

Private Attributes

sqlite3 * db_ = nullptr
 
std::filesystem::path root_
 
Ops ops_
 
bool poisoned_ = false
 
bool native_merges_validated_ = false
 
unsigned schema_version_ = 2
 
std::optional< object_id > identity_
 
std::optional< object_id > private_scope_
 

Static Private Attributes

static constexpr char const * immutable_tables []
 

Member Typedef Documentation

◆ operation_type

template<class P , class Ops = sqlite_catalog_ops>
using everett::sqlite_catalog< P, Ops >::operation_type = catalog_operation

◆ policy_type

template<class P , class Ops = sqlite_catalog_ops>
using everett::sqlite_catalog< P, Ops >::policy_type = P

Member Enumeration Documentation

◆ private_scope_state

template<class P , class Ops = sqlite_catalog_ops>
enum struct everett::sqlite_catalog::private_scope_state
strong
Enumerator
missing 
active 
released 

Constructor & Destructor Documentation

◆ sqlite_catalog() [1/3]

template<class P , class Ops = sqlite_catalog_ops>
everett::sqlite_catalog< P, Ops >::sqlite_catalog ( sqlite_catalog< P, Ops > const &  )
delete

◆ sqlite_catalog() [2/3]

template<class P , class Ops = sqlite_catalog_ops>
everett::sqlite_catalog< P, Ops >::sqlite_catalog ( sqlite_catalog< P, Ops > &&  other)
inlinenoexcept

◆ ~sqlite_catalog()

template<class P , class Ops = sqlite_catalog_ops>
everett::sqlite_catalog< P, Ops >::~sqlite_catalog ( )
inline

◆ sqlite_catalog() [3/3]

template<class P , class Ops = sqlite_catalog_ops>
everett::sqlite_catalog< P, Ops >::sqlite_catalog ( sqlite3 *  db,
std::filesystem::path  root,
Ops  ops 
)
inlineprivate

Member Function Documentation

◆ acquire_native_merge()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< object_seal_receipt > everett::sqlite_catalog< P, Ops >::acquire_native_merge ( std::string_view  op,
catalog_native_merge const &  key,
std::string_view  owner 
)
inline

◆ acquire_save()

template<class P , class Ops = sqlite_catalog_ops>
catalog_saved_root everett::sqlite_catalog< P, Ops >::acquire_save ( std::string_view  op,
std::string_view  name,
std::string_view  reader_owner 
)
inline

◆ add_auxiliary()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::add_auxiliary ( std::string_view  kind,
std::string_view  owner,
catalog_auxiliary_roots const &  value 
)
inlineprivate

◆ add_generation()

template<class P , class Ops = sqlite_catalog_ops>
catalog_timeline_head everett::sqlite_catalog< P, Ops >::add_generation ( std::string_view  name,
std::uint64_t  generation,
blob_identity const &  head 
)
inlineprivate

◆ add_native_pin()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::add_native_pin ( std::string_view  owner,
object_id const &  native 
)
inlineprivate

◆ add_owner()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::add_owner ( std::string_view  kind,
std::string_view  name 
)
inlineprivate

◆ add_root()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::add_root ( std::string_view  kind,
std::string_view  owner,
blob_identity const &  pair 
)
inlineprivate

◆ add_session_generation()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_head everett::sqlite_catalog< P, Ops >::add_session_generation ( std::string_view  name,
std::uint64_t  generation,
blob_identity const &  head,
std::span< std::byte const >  checkpoint,
catalog_auxiliary_roots const &  auxiliary 
)
inlineprivate

◆ append_native_merge()

template<class P , class Ops = sqlite_catalog_ops>
static void everett::sqlite_catalog< P, Ops >::append_native_merge ( catalog_detail::bytes &  out,
std::span< std::byte const >  domain,
catalog_native_merge const &  key 
)
inlinestaticprivate

◆ append_pair_request()

template<class P , class Ops = sqlite_catalog_ops>
static void everett::sqlite_catalog< P, Ops >::append_pair_request ( catalog_detail::bytes &  request,
cola_pair_descriptor const &  descriptor 
)
inlinestaticprivate

◆ append_seal_request()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::append_seal_request ( catalog_detail::bytes &  request,
object_seal_receipt const &  receipt,
std::filesystem::path const &  path 
) const
inlineprivate

◆ attach_checkpoint()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_head everett::sqlite_catalog< P, Ops >::attach_checkpoint ( catalog_timeline_head  head) const
inlineprivate

◆ auxiliary_at()

template<class P , class Ops = sqlite_catalog_ops>
catalog_auxiliary_roots everett::sqlite_catalog< P, Ops >::auxiliary_at ( catalog_timeline_head const &  head) const
inlineprivate

◆ begin_private_scope()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::begin_private_scope ( std::string_view  op,
object_id const &  id 
)
inline

◆ check_object_envelope()

template<class P , class Ops = sqlite_catalog_ops>
static void everett::sqlite_catalog< P, Ops >::check_object_envelope ( file_kind  expected,
std::uint64_t  size,
std::uint64_t  crc,
std::span< std::byte const >  bytes 
)
inlinestaticprivate

◆ checkpoint_at()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_detail::bytes > everett::sqlite_catalog< P, Ops >::checkpoint_at ( std::string_view  name,
std::uint64_t  generation 
) const
inlineprivate

◆ compatible_policy()

template<class P , class Ops = sqlite_catalog_ops>
static bool everett::sqlite_catalog< P, Ops >::compatible_policy ( std::span< std::byte const >  stored)
inlinestaticprivate

◆ connect()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::connect ( std::filesystem::path const &  root,
catalog_options  options,
Ops  ops,
bool  initialize = false 
)
inlinestaticprivate

◆ create()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::create ( std::filesystem::path const &  root,
object_id const &  identity,
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ create_cola()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::create_cola ( std::filesystem::path const &  root,
object_id const &  identity,
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ create_session()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_head everett::sqlite_catalog< P, Ops >::create_session ( std::string_view  op,
std::string_view  name,
blob_identity const &  head,
std::span< std::byte const >  checkpoint,
catalog_auxiliary_roots  auxiliary = {} 
)
inline

◆ create_sessions()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::create_sessions ( std::filesystem::path const &  root,
object_id const &  identity,
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ create_timeline()

template<class P , class Ops = sqlite_catalog_ops>
catalog_timeline_head everett::sqlite_catalog< P, Ops >::create_timeline ( std::string_view  op,
std::string_view  name,
blob_identity const &  head 
)
inline

◆ create_version()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::create_version ( std::filesystem::path const &  root,
object_id const &  identity,
catalog_options  options,
Ops  ops,
unsigned  version 
)
inlinestaticprivate

◆ decode_session()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_head everett::sqlite_catalog< P, Ops >::decode_session ( catalog_detail::bytes const &  bytes) const
inlineprivate

◆ decode_timeline()

template<class P , class Ops = sqlite_catalog_ops>
catalog_timeline_head everett::sqlite_catalog< P, Ops >::decode_timeline ( catalog_detail::bytes const &  bytes) const
inlineprivate

◆ definition()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::definition ( std::string_view  type,
std::string_view  name,
std::string_view  expected 
) const
inlineprivate

◆ detect_schema_version()

template<class P , class Ops = sqlite_catalog_ops>
unsigned everett::sqlite_catalog< P, Ops >::detect_schema_version ( ) const
inlineprivate

◆ ensure_private_scopes()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::ensure_private_scopes ( )
inlineprivate

◆ find_save()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< blob_identity > everett::sqlite_catalog< P, Ops >::find_save ( std::string_view  name) const
inline

◆ find_saved_session()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_session_head > everett::sqlite_catalog< P, Ops >::find_saved_session ( std::string_view  name) const
inline

◆ find_session()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_session_head > everett::sqlite_catalog< P, Ops >::find_session ( std::string_view  name) const
inline

◆ find_timeline()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_timeline_head > everett::sqlite_catalog< P, Ops >::find_timeline ( std::string_view  name) const
inline

◆ fork_session()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_head everett::sqlite_catalog< P, Ops >::fork_session ( std::string_view  op,
std::string_view  name,
catalog_session_head const &  source 
)
inline

◆ fork_timeline()

template<class P , class Ops = sqlite_catalog_ops>
catalog_timeline_head everett::sqlite_catalog< P, Ops >::fork_timeline ( std::string_view  op,
std::string_view  name,
catalog_timeline_head const &  source 
)
inline

◆ has_table()

template<class P , class Ops = sqlite_catalog_ops>
bool everett::sqlite_catalog< P, Ops >::has_table ( std::string_view  table) const
inlineprivate

◆ identity() [1/2]

template<class P , class Ops = sqlite_catalog_ops>
object_id const & everett::sqlite_catalog< P, Ops >::identity ( ) const &
inline

◆ identity() [2/2]

template<class P , class Ops = sqlite_catalog_ops>
object_id const & everett::sqlite_catalog< P, Ops >::identity ( ) const &&
delete

◆ insert_cola_row()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::insert_cola_row ( cola_pair_descriptor const &  value)
inlineprivate

◆ kind()

template<class P , class Ops = sqlite_catalog_ops>
static std::int64_t everett::sqlite_catalog< P, Ops >::kind ( file_kind  value)
inlinestaticprivate

◆ lookup_operation()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_operation > everett::sqlite_catalog< P, Ops >::lookup_operation ( std::string_view  op) const
inline

◆ native_merge_domain()

template<class P , class Ops = sqlite_catalog_ops>
static catalog_detail::bytes everett::sqlite_catalog< P, Ops >::native_merge_domain ( catalog_native_merge const &  key)
inlinestaticprivate

◆ native_merge_output()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< object_id > everett::sqlite_catalog< P, Ops >::native_merge_output ( std::span< std::byte const >  domain,
catalog_native_merge const &  key 
) const
inlineprivate

◆ open()

template<class P , class Ops = sqlite_catalog_ops>
static sqlite_catalog everett::sqlite_catalog< P, Ops >::open ( std::filesystem::path const &  root,
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ open_object_bytes()

template<class P , class Ops = sqlite_catalog_ops>
mapped_slice everett::sqlite_catalog< P, Ops >::open_object_bytes ( object_id const &  id,
file_kind  expected 
) const
inlineprivate

◆ operator=() [1/2]

template<class P , class Ops = sqlite_catalog_ops>
sqlite_catalog & everett::sqlite_catalog< P, Ops >::operator= ( sqlite_catalog< P, Ops > &&  )
delete

◆ operator=() [2/2]

template<class P , class Ops = sqlite_catalog_ops>
sqlite_catalog & everett::sqlite_catalog< P, Ops >::operator= ( sqlite_catalog< P, Ops > const &  )
delete

◆ poisoned()

template<class P , class Ops = sqlite_catalog_ops>
bool everett::sqlite_catalog< P, Ops >::poisoned ( ) const
inlinenoexcept

◆ policy()

template<class P , class Ops = sqlite_catalog_ops>
static catalog_detail::bytes everett::sqlite_catalog< P, Ops >::policy ( )
inlinestaticprivate

◆ prepare_cola_pair()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
prepared_cola_pair< Mapped > everett::sqlite_catalog< P, Ops >::prepare_cola_pair ( blob_identity const &  id,
object_seal_receipt const *  receipt = nullptr,
object_seal_receipt const *  native_receipt = nullptr 
) const
inlineprivate

◆ private_construction()

template<class P , class Ops = sqlite_catalog_ops>
bool everett::sqlite_catalog< P, Ops >::private_construction ( ) const
inlinenoexcept

◆ private_scopes()

template<class P , class Ops = sqlite_catalog_ops>
std::vector< object_id > everett::sqlite_catalog< P, Ops >::private_scopes ( ) const
inline

◆ publish_session()

template<class P , class Ops = sqlite_catalog_ops>
catalog_session_publication everett::sqlite_catalog< P, Ops >::publish_session ( std::string_view  op,
catalog_session_head const &  expected,
blob_identity const &  candidate,
std::span< std::byte const >  checkpoint,
catalog_auxiliary_roots  auxiliary = {} 
)
inline

◆ publish_timeline()

template<class P , class Ops = sqlite_catalog_ops>
catalog_timeline_publication everett::sqlite_catalog< P, Ops >::publish_timeline ( std::string_view  op,
catalog_timeline_head const &  expected,
blob_identity const &  candidate 
)
inline

◆ read()

template<class P , class Ops = sqlite_catalog_ops>
template<class F >
auto everett::sqlite_catalog< P, Ops >::read ( F &&  action) const
inlineprivate

◆ record_native_merge()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::record_native_merge ( std::string_view  op,
catalog_native_merge const &  key,
object_seal_receipt const &  receipt,
std::string_view  owner 
)
inline

◆ record_prepared_seal()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::record_prepared_seal ( object_seal_receipt const &  receipt,
file_kind  expected 
)
inlineprivate

◆ record_sealed()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::record_sealed ( std::string_view  op,
object_seal_receipt const &  receipt 
)
inline

◆ record_sealed_row()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::record_sealed_row ( object_seal_receipt const &  receipt,
std::filesystem::path const &  path,
mapped_slice const *  evidence = nullptr 
)
inlineprivate

◆ register_chain() [1/2]

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::register_chain ( std::string_view  op,
mapped_cola_query_root< P > const &  source,
catalog_admission  admission = catalog_admission::trusted 
)
inline

◆ register_chain() [2/2]

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::register_chain ( std::string_view  op,
mapped_query_root< P > const &  source,
catalog_admission  admission = catalog_admission::trusted 
)
inline

◆ register_cola_row()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::register_cola_row ( cola_pair_descriptor const &  value)
inlineprivate

◆ register_graph()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
void everett::sqlite_catalog< P, Ops >::register_graph ( std::string_view  op,
std::shared_ptr< Mapped const > const &  source,
catalog_admission  admission = catalog_admission::trusted 
)
inline

◆ register_graphs()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
void everett::sqlite_catalog< P, Ops >::register_graphs ( std::string_view  op,
std::span< std::shared_ptr< Mapped const > const >  roots,
catalog_admission  admission = catalog_admission::trusted 
)
inline

◆ register_pair()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
void everett::sqlite_catalog< P, Ops >::register_pair ( std::string_view  op,
blob_identity const &  id 
)
inline

◆ release_private_scope()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::release_private_scope ( std::string_view  op,
object_id const &  id 
)
inline

◆ require_active()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_active ( ) const
inlineprivate

◆ require_prepared()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_prepared ( blob_identity const &  head) const
inlineprivate

◆ require_private_scope()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_private_scope ( object_id const &  id) const
inlineprivate

◆ require_sealed()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_sealed ( object_id const &  id,
file_kind  expected,
mapped_slice const *  evidence = nullptr 
) const
inlineprivate

◆ require_sessions()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_sessions ( ) const
inlineprivate

◆ require_timelines()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::require_timelines ( ) const
inlineprivate

◆ reserve()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::reserve ( std::string_view  op,
object_attempt_id const &  attempt,
std::string_view  owner,
std::span< blob_identity const >  inputs,
std::span< catalog_object_reservation const >  outputs 
)
inline

◆ root() [1/2]

template<class P , class Ops = sqlite_catalog_ops>
std::filesystem::path const & everett::sqlite_catalog< P, Ops >::root ( ) const &&
delete

◆ root() [2/2]

template<class P , class Ops = sqlite_catalog_ops>
std::filesystem::path const & everett::sqlite_catalog< P, Ops >::root ( ) const &
inlinenoexcept

◆ runtime_version()

template<class P , class Ops = sqlite_catalog_ops>
static char const * everett::sqlite_catalog< P, Ops >::runtime_version ( )
inlinestaticnoexcept

◆ save()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::save ( std::string_view  op,
std::string_view  name,
blob_identity const &  head 
)
inline

◆ save_session()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::save_session ( std::string_view  op,
std::string_view  name,
catalog_session_head const &  source 
)
inline

◆ schema_version()

template<class P , class Ops = sqlite_catalog_ops>
unsigned everett::sqlite_catalog< P, Ops >::schema_version ( ) const
inlinenoexcept

◆ scope_state()

template<class P , class Ops = sqlite_catalog_ops>
private_scope_state everett::sqlite_catalog< P, Ops >::scope_state ( object_id const &  id) const
inline

◆ seal_native_pair()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
auto everett::sqlite_catalog< P, Ops >::seal_native_pair ( std::string_view  op,
blob_identity const &  id,
object_seal_receipt const &  native_receipt,
object_seal_receipt const &  index_receipt 
)
inline

◆ seal_pair()

template<class P , class Ops = sqlite_catalog_ops>
template<class Mapped >
auto everett::sqlite_catalog< P, Ops >::seal_pair ( std::string_view  op,
blob_identity const &  id,
object_seal_receipt const &  receipt 
)
inline

◆ sealed_receipt()

template<class P , class Ops = sqlite_catalog_ops>
object_seal_receipt everett::sqlite_catalog< P, Ops >::sealed_receipt ( object_id const &  id,
file_kind  expected 
) const
inline

◆ set_private_scope()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::set_private_scope ( object_id const &  id)
inline

◆ source_id()

template<class P , class Ops = sqlite_catalog_ops>
static char const * everett::sqlite_catalog< P, Ops >::source_id ( )
inlinestaticnoexcept

◆ timeline_at()

template<class P , class Ops = sqlite_catalog_ops>
std::optional< catalog_timeline_head > everett::sqlite_catalog< P, Ops >::timeline_at ( std::string_view  name,
std::optional< std::uint64_t >  generation = {} 
) const
inlineprivate

◆ transaction()

template<class P , class Ops = sqlite_catalog_ops>
template<class F >
catalog_detail::bytes everett::sqlite_catalog< P, Ops >::transaction ( std::string_view  op,
std::string_view  kind,
catalog_detail::bytes const &  request,
F &&  apply,
bool  record = true 
)
inlineprivate

◆ validate_native_merges()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::validate_native_merges ( ) const
inlineprivate

◆ validate_options()

template<class P , class Ops = sqlite_catalog_ops>
static void everett::sqlite_catalog< P, Ops >::validate_options ( catalog_options  options)
inlinestaticprivate

◆ validate_private_scopes()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::validate_private_scopes ( ) const
inlineprivate

◆ validate_schema()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::validate_schema ( ) const
inlineprivate

◆ validate_timeline()

template<class P , class Ops = sqlite_catalog_ops>
static void everett::sqlite_catalog< P, Ops >::validate_timeline ( catalog_timeline_head const &  value)
inlinestaticprivate

◆ verify_object_envelope()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::verify_object_envelope ( object_id const &  id,
file_kind  expected,
std::uint64_t  size,
std::uint64_t  crc 
) const
inlineprivate

◆ verify_sealed()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::verify_sealed ( object_seal_receipt const &  receipt,
file_kind  expected 
) const
inline

◆ write_seal()

template<class P , class Ops = sqlite_catalog_ops>
void everett::sqlite_catalog< P, Ops >::write_seal ( object_seal_receipt const &  receipt)
inlineprivate

Member Data Documentation

◆ db_

template<class P , class Ops = sqlite_catalog_ops>
sqlite3* everett::sqlite_catalog< P, Ops >::db_ = nullptr
private

◆ identity_

template<class P , class Ops = sqlite_catalog_ops>
std::optional<object_id> everett::sqlite_catalog< P, Ops >::identity_
private

◆ immutable_tables

template<class P , class Ops = sqlite_catalog_ops>
constexpr char const* everett::sqlite_catalog< P, Ops >::immutable_tables[]
inlinestaticconstexprprivate
Initial value:
= {
"catalog_info", "operations", "owners", "attempts", "pairs", "owner_objects", "owner_roots", "saves",
"timelines", "timeline_generations", "session_checkpoints", "session_saves", "completed_native_merges",
"private_scopes", "private_attempts", "released_private_scopes"
}

◆ native_merges_validated_

template<class P , class Ops = sqlite_catalog_ops>
bool everett::sqlite_catalog< P, Ops >::native_merges_validated_ = false
mutableprivate

◆ ops_

template<class P , class Ops = sqlite_catalog_ops>
Ops everett::sqlite_catalog< P, Ops >::ops_
private

◆ poisoned_

template<class P , class Ops = sqlite_catalog_ops>
bool everett::sqlite_catalog< P, Ops >::poisoned_ = false
mutableprivate

◆ private_scope_

template<class P , class Ops = sqlite_catalog_ops>
std::optional<object_id> everett::sqlite_catalog< P, Ops >::private_scope_
private

◆ root_

template<class P , class Ops = sqlite_catalog_ops>
std::filesystem::path everett::sqlite_catalog< P, Ops >::root_
private

◆ schema_version_

template<class P , class Ops = sqlite_catalog_ops>
unsigned everett::sqlite_catalog< P, Ops >::schema_version_ = 2
private

The documentation for this struct was generated from the following file: