20 #ifndef RIPPLE_CORE_RELATIONALDBINTERFACE_H_INCLUDED
21 #define RIPPLE_CORE_RELATIONALDBINTERFACE_H_INCLUDED
23 #include <ripple/app/ledger/Ledger.h>
24 #include <ripple/app/main/Application.h>
25 #include <ripple/app/misc/Transaction.h>
26 #include <ripple/core/Config.h>
27 #include <ripple/core/DatabaseCon.h>
28 #include <ripple/peerfinder/impl/Store.h>
29 #include <ripple/rpc/impl/RPCHelpers.h>
30 #include <boost/filesystem.hpp>
31 #include <boost/optional.hpp>
32 #include <boost/variant.hpp>
128 :
accounts(meta.getAffectedAccounts(j))
244 template <
class T,
class C>
257 <<
"rangeCheckedCast domain error:"
262 return static_cast<T
>(c);
boost::container::flat_set< AccountID > accounts
Struct used to keep track of what to write to transactions and account_transactions tables in Postgre...
std::optional< AccountTxMarker > marker
virtual uint256 getHashByIndex(LedgerIndex ledgerIndex)=0
getHashByIndex Returns hash of ledger with given sequence.
std::optional< AccountTxMarker > marker
std::optional< LedgerSpecifier > ledger
static std::unique_ptr< RelationalDBInterface > init(Application &app, Config const &config, JobQueue &jobQueue)
init Creates and returns appropriate interface based on config.
beast::Journal debugLog()
Returns a debug journal.
virtual std::optional< LedgerIndex > getMinLedgerSeq()=0
getMinLedgerSeq Returns minimum ledger sequence in Ledgers table.
std::variant< AccountTxs, MetaTxsList > transactions
virtual std::vector< std::shared_ptr< Transaction > > getTxHistory(LedgerIndex startIndex)=0
getTxHistory Returns most recent 20 transactions starting from given number or entry.
AccountID const & account
virtual std::optional< LedgerIndex > getMaxLedgerSeq()=0
getMaxLedgerSeq Returns maximum ledger sequence in Ledgers table.
virtual std::optional< LedgerInfo > getLedgerInfoByIndex(LedgerIndex ledgerSeq)=0
getLedgerInfoByIndex Returns ledger by its sequence.
virtual bool transactionDbHasSpace(Config const &config)=0
transactionDbHasSpace Checks if transaction database has available space.
virtual std::optional< LedgerInfo > getLedgerInfoByHash(uint256 const &ledgerHash)=0
getLedgerInfoByHash Returns info of ledger with given hash.
AccountID const & account
uint32_t transactionIndex
A generic endpoint for log messages.
virtual ~RelationalDBInterface()=default
LedgerIndex maxLedgerSequence
A pool of threads to perform work.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
LedgerIndex minLedgerSequence
AccountTransactionsData(TxMeta const &meta, uint256 const &nodestoreHash, beast::Journal j)
std::optional< AccountTxMarker > marker
virtual std::optional< LedgerInfo > getNewestLedgerInfo()=0
getNewestLedgerInfo Returns info of newest saved ledger.
virtual bool ledgerDbHasSpace(Config const &config)=0
ledgerDbHasSpace Checks if ledger database has available space.
virtual std::optional< LedgerHashPair > getHashesByIndex(LedgerIndex ledgerIndex)=0
getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequenc...