xrpld
Loading...
Searching...
No Matches
xrpl::peer_finder::StoreSqdb Class Reference

Database persistence for PeerFinder using SQLite. More...

#include <StoreSqdb.h>

Inheritance diagram for xrpl::peer_finder::StoreSqdb:
Collaboration diagram for xrpl::peer_finder::StoreSqdb:

Public Types

using load_callback = std::function<void(beast::ip::Endpoint, int)>

Public Member Functions

 StoreSqdb (beast::Journal journal=beast::Journal{beast::Journal::getNullSink()})
 ~StoreSqdb () override=default
void open (BasicConfig const &config)
std::size_t load (load_callback const &cb) override
void save (std::vector< Entry > const &v) override
void update ()

Static Public Attributes

static constexpr auto kCurrentSchemaVersion = 4

Private Member Functions

void init (BasicConfig const &config)

Private Attributes

beast::Journal journal_
soci::session sqlDb_

Detailed Description

Database persistence for PeerFinder using SQLite.

Definition at line 22 of file StoreSqdb.h.

Member Typedef Documentation

◆ load_callback

Definition at line 20 of file Store.h.

Constructor & Destructor Documentation

◆ StoreSqdb()

xrpl::peer_finder::StoreSqdb::StoreSqdb ( beast::Journal journal = beast::Journal{beast::Journal::getNullSink()})
explicit

Definition at line 31 of file StoreSqdb.h.

◆ ~StoreSqdb()

xrpl::peer_finder::StoreSqdb::~StoreSqdb ( )
overridedefault

Member Function Documentation

◆ open()

void xrpl::peer_finder::StoreSqdb::open ( BasicConfig const & config)

Definition at line 39 of file StoreSqdb.h.

◆ load()

std::size_t xrpl::peer_finder::StoreSqdb::load ( load_callback const & cb)
overridevirtual

Implements xrpl::peer_finder::Store.

Definition at line 48 of file StoreSqdb.h.

◆ save()

void xrpl::peer_finder::StoreSqdb::save ( std::vector< Entry > const & v)
overridevirtual

Implements xrpl::peer_finder::Store.

Definition at line 72 of file StoreSqdb.h.

◆ update()

void xrpl::peer_finder::StoreSqdb::update ( )

Definition at line 80 of file StoreSqdb.h.

◆ init()

void xrpl::peer_finder::StoreSqdb::init ( BasicConfig const & config)
private

Definition at line 87 of file StoreSqdb.h.

Member Data Documentation

◆ journal_

beast::Journal xrpl::peer_finder::StoreSqdb::journal_
private

Definition at line 25 of file StoreSqdb.h.

◆ sqlDb_

soci::session xrpl::peer_finder::StoreSqdb::sqlDb_
private

Definition at line 26 of file StoreSqdb.h.

◆ kCurrentSchemaVersion

auto xrpl::peer_finder::StoreSqdb::kCurrentSchemaVersion = 4
staticconstexpr

Definition at line 29 of file StoreSqdb.h.