All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Public Attributes | List of all members
Akumuli::MetadataStorage Struct Reference

#include <metadatastorage.h>

Public Types

typedef std::unique_ptr
< apr_pool_t, decltype(&delete_apr_pool)> 
typedef const apr_dbd_driver_t * DriverT
typedef std::unique_ptr
< apr_dbd_t, AprHandleDeleter
typedef std::pair< int,
std::string > 
typedef apr_dbd_prepared_t * PreparedT
typedef std::tuple< const char
*, int, uint64_t > 

Public Member Functions

 MetadataStorage (const char *db, aku_logger_cb_t logger)
void create_tables ()
void init_volumes (std::vector< VolumeDesc > volumes)
void init_config (const char *creation_datetime)
std::vector< VolumeDesc > get_volumes () const
void get_configs (std::string *creation_datetime)
uint64_t get_prev_largest_id ()
aku_Status load_matcher_data (SeriesMatcher &matcher)
void insert_new_names (std::vector< SeriesT > items)

Public Attributes

PoolT pool_
DriverT driver_
HandleT handle_
PreparedT insert_
aku_logger_cb_t logger_

Detailed Description

Sqlite3 backed storage for metadata. Metadata includes:

Constructor & Destructor Documentation

Akumuli::MetadataStorage::MetadataStorage ( const char *  db,
aku_logger_cb_t  logger 

Create new or open existing db.

std::runtime_errorin a case of error

Member Function Documentation

void Akumuli::MetadataStorage::create_tables ( )

Create tables if database is empty

std::runtime_errorin a case of error
uint64_t Akumuli::MetadataStorage::get_prev_largest_id ( )

Read larges series id

std::vector< MetadataStorage::VolumeDesc > Akumuli::MetadataStorage::get_volumes ( ) const

Read list of volumes and their sequence numbers.

std::runtime_errorin a case of error
void Akumuli::MetadataStorage::init_volumes ( std::vector< VolumeDesc >  volumes)

Initialize volumes table

std::runtime_errorin a case of error
void Akumuli::MetadataStorage::insert_new_names ( std::vector< SeriesT >  items)

Add new series to the metadata storage.

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