20 #ifndef RIPPLE_APP_RDB_RELATIONALDATABASE_H_INCLUDED
21 #define RIPPLE_APP_RDB_RELATIONALDATABASE_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())
250 template <
class T,
class C>
263 <<
"rangeCheckedCast domain error:"
268 return static_cast<T
>(c);
static std::unique_ptr< RelationalDatabase > init(Application &app, Config const &config, JobQueue &jobQueue)
init Creates and returns an appropriate RelationalDatabase instance based on configuration.
virtual std::optional< LedgerIndex > getMaxLedgerSeq()=0
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.
virtual ~RelationalDatabase()=default
boost::container::flat_set< AccountID > accounts
virtual std::vector< std::shared_ptr< Transaction > > getTxHistory(LedgerIndex startIndex)=0
getTxHistory Returns the 20 most recent transactions starting from the given number.
LedgerIndex minLedgerSequence
std::variant< AccountTxs, MetaTxsList > transactions
virtual std::optional< LedgerInfo > getNewestLedgerInfo()=0
getNewestLedgerInfo Returns the info of the newest saved ledger.
virtual std::optional< LedgerInfo > getLedgerInfoByIndex(LedgerIndex ledgerSeq)=0
getLedgerInfoByIndex Returns a ledger by its sequence.
beast::Journal debugLog()
Returns a debug journal.
AccountID const & account
virtual uint256 getHashByIndex(LedgerIndex ledgerIndex)=0
getHashByIndex Returns the hash of the ledger with the given sequence.
std::optional< AccountTxMarker > marker
std::optional< AccountTxMarker > marker
virtual std::optional< LedgerInfo > getLedgerInfoByHash(uint256 const &ledgerHash)=0
getLedgerInfoByHash Returns the info of the ledger with given hash.
virtual std::optional< LedgerIndex > getMinLedgerSeq()=0
getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.
A generic endpoint for log messages.
LedgerIndex maxLedgerSequence
AccountID const & account
A pool of threads to perform work.
uint32_t transactionIndex
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual bool transactionDbHasSpace(Config const &config)=0
transactionDbHasSpace Checks if the transaction database has available space.
virtual bool ledgerDbHasSpace(Config const &config)=0
ledgerDbHasSpace Checks if the ledger database has available space.
std::optional< LedgerSpecifier > ledger
AccountTransactionsData(TxMeta const &meta, uint256 const &nodestoreHash, beast::Journal j)
virtual std::optional< LedgerHashPair > getHashesByIndex(LedgerIndex ledgerIndex)=0
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.
std::optional< AccountTxMarker > marker
Struct used to keep track of what to write to transactions and account_transactions tables in Postgre...