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

Database persistence for PeerFinder using SQLite. More...

#include <StoreSqdb.h>

Inheritance diagram for xrpl::PeerFinder::StoreSqdb:
Collaboration diagram for xrpl::PeerFinder::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 11 of file StoreSqdb.h.

Member Typedef Documentation

◆ load_callback

Definition at line 12 of file Store.h.

Constructor & Destructor Documentation

◆ StoreSqdb()

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

Definition at line 20 of file StoreSqdb.h.

◆ ~StoreSqdb()

xrpl::PeerFinder::StoreSqdb::~StoreSqdb ( )
overridedefault

Member Function Documentation

◆ open()

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

Definition at line 28 of file StoreSqdb.h.

◆ load()

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

Implements xrpl::PeerFinder::Store.

Definition at line 37 of file StoreSqdb.h.

◆ save()

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

Implements xrpl::PeerFinder::Store.

Definition at line 61 of file StoreSqdb.h.

◆ update()

void xrpl::PeerFinder::StoreSqdb::update ( )

Definition at line 69 of file StoreSqdb.h.

◆ init()

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

Definition at line 76 of file StoreSqdb.h.

Member Data Documentation

◆ journal_

beast::Journal xrpl::PeerFinder::StoreSqdb::journal_
private

Definition at line 14 of file StoreSqdb.h.

◆ sqlDb_

soci::session xrpl::PeerFinder::StoreSqdb::sqlDb_
private

Definition at line 15 of file StoreSqdb.h.

◆ kCurrentSchemaVersion

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

Definition at line 18 of file StoreSqdb.h.