rippled
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ripple::RelationalDBInterfaceSqlite Class Referenceabstract
Inheritance diagram for ripple::RelationalDBInterfaceSqlite:
Inheritance graph
[legend]
Collaboration diagram for ripple::RelationalDBInterfaceSqlite:
Collaboration graph
[legend]

Public Types

using AccountTx = std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > >
 
using AccountTxs = std::vector< AccountTx >
 
using txnMetaLedgerType = std::tuple< Blob, Blob, std::uint32_t >
 
using MetaTxsList = std::vector< txnMetaLedgerType >
 
using LedgerSequence = uint32_t
 
using LedgerHash = uint256
 
using LedgerShortcut = RPC::LedgerShortcut
 
using LedgerSpecifier = std::variant< LedgerRange, LedgerShortcut, LedgerSequence, LedgerHash >
 

Public Member Functions

virtual std::optional< LedgerIndexgetTransactionsMinLedgerSeq ()=0
 getTransactionsMinLedgerSeq Returns minimum ledger sequence among records in the Transactions table. More...
 
virtual std::optional< LedgerIndexgetAccountTransactionsMinLedgerSeq ()=0
 getAccountTransactionsMinLedgerSeq Returns minimum ledger sequence among records in the AccountTransactions table. More...
 
virtual void deleteTransactionByLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteTransactionByLedgerSeq Deletes transactions from ledger with given sequence. More...
 
virtual void deleteBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteBeforeLedgerSeq Deletes all ledgers with given sequence and all sequences below it. More...
 
virtual void deleteTransactionsBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteTransactionsBeforeLedgerSeq Deletes all transactions with given ledger sequence and all sequences below it. More...
 
virtual void deleteAccountTransactionsBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteAccountTransactionsBeforeLedgerSeq Deletes all account transactions with given ledger sequence and all sequences below it. More...
 
virtual std::size_t getTransactionCount ()=0
 getTransactionCount Returns number of transactions. More...
 
virtual std::size_t getAccountTransactionCount ()=0
 getAccountTransactionCount Returns number of account transactions. More...
 
virtual struct CountMinMax getLedgerCountMinMax ()=0
 getLedgerCountMinMax Returns minumum ledger sequence, maximum ledger sequence and total number of saved ledgers. More...
 
virtual bool saveValidatedLedger (std::shared_ptr< Ledger const > const &ledger, bool current)=0
 saveValidatedLedger Saves ledger into database. More...
 
virtual std::optional< LedgerInfogetLimitedOldestLedgerInfo (LedgerIndex ledgerFirstIndex)=0
 getLimitedOldestLedgerInfo Returns info of oldest ledger from ledgers with sequences greater or equal to given. More...
 
virtual std::optional< LedgerInfogetLimitedNewestLedgerInfo (LedgerIndex ledgerFirstIndex)=0
 getLimitedNewestLedgerInfo Returns info of newest ledger from ledgers with sequences greater or equal to given. More...
 
virtual AccountTxs getOldestAccountTxs (AccountTxOptions const &options)=0
 getOldestAccountTxs Returns oldest transactions for given account which match given criteria starting from given offset. More...
 
virtual AccountTxs getNewestAccountTxs (AccountTxOptions const &options)=0
 getNewestAccountTxs Returns newest transactions for given account which match given criteria starting from given offset. More...
 
virtual MetaTxsList getOldestAccountTxsB (AccountTxOptions const &options)=0
 getOldestAccountTxsB Returns oldest transactions in binary form for given account which match given criteria starting from given offset. More...
 
virtual MetaTxsList getNewestAccountTxsB (AccountTxOptions const &options)=0
 getNewestAccountTxsB Returns newest transactions in binary form for given account which match given criteria starting from given offset. More...
 
virtual std::pair< AccountTxs, std::optional< AccountTxMarker > > oldestAccountTxPage (AccountTxPageOptions const &options)=0
 oldestAccountTxPage Returns oldest transactions for given account which match given criteria starting from given marker. More...
 
virtual std::pair< AccountTxs, std::optional< AccountTxMarker > > newestAccountTxPage (AccountTxPageOptions const &options)=0
 newestAccountTxPage Returns newest transactions for given account which match given criteria starting from given marker. More...
 
virtual std::pair< MetaTxsList, std::optional< AccountTxMarker > > oldestAccountTxPageB (AccountTxPageOptions const &options)=0
 oldestAccountTxPageB Returns oldest transactions in binary form for given account which match given criteria starting from given marker. More...
 
virtual std::pair< MetaTxsList, std::optional< AccountTxMarker > > newestAccountTxPageB (AccountTxPageOptions const &options)=0
 newestAccountTxPageB Returns newest transactions in binary form for given account which match given criteria starting from given marker. More...
 
virtual std::variant< AccountTx, TxSearchedgetTransaction (uint256 const &id, std::optional< ClosedInterval< uint32_t >> const &range, error_code_i &ec)=0
 getTransaction Returns transaction with given hash. More...
 
virtual uint32_t getKBUsedAll ()=0
 getKBUsedAll Returns space used by all databases. More...
 
virtual uint32_t getKBUsedLedger ()=0
 getKBUsedLedger Returns space used by ledger database. More...
 
virtual uint32_t getKBUsedTransaction ()=0
 getKBUsedTransaction Returns space used by transaction database. More...
 
virtual void closeLedgerDB ()=0
 Closes the ledger database. More...
 
virtual void closeTransactionDB ()=0
 Closes the transaction database. More...
 
virtual std::optional< LedgerIndexgetMinLedgerSeq ()=0
 getMinLedgerSeq Returns minimum ledger sequence in Ledgers table. More...
 
virtual std::optional< LedgerIndexgetMaxLedgerSeq ()=0
 getMaxLedgerSeq Returns maximum ledger sequence in Ledgers table. More...
 
virtual std::optional< LedgerInfogetLedgerInfoByIndex (LedgerIndex ledgerSeq)=0
 getLedgerInfoByIndex Returns ledger by its sequence. More...
 
virtual std::optional< LedgerInfogetNewestLedgerInfo ()=0
 getNewestLedgerInfo Returns info of newest saved ledger. More...
 
virtual std::optional< LedgerInfogetLedgerInfoByHash (uint256 const &ledgerHash)=0
 getLedgerInfoByHash Returns info of ledger with given hash. More...
 
virtual uint256 getHashByIndex (LedgerIndex ledgerIndex)=0
 getHashByIndex Returns hash of ledger with given sequence. More...
 
virtual std::optional< LedgerHashPairgetHashesByIndex (LedgerIndex ledgerIndex)=0
 getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence. More...
 
virtual std::map< LedgerIndex, LedgerHashPairgetHashesByIndex (LedgerIndex minSeq, LedgerIndex maxSeq)=0
 getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit. More...
 
virtual std::vector< std::shared_ptr< Transaction > > getTxHistory (LedgerIndex startIndex)=0
 getTxHistory Returns most recent 20 transactions starting from given number or entry. More...
 
virtual bool ledgerDbHasSpace (Config const &config)=0
 ledgerDbHasSpace Checks if ledger database has available space. More...
 
virtual bool transactionDbHasSpace (Config const &config)=0
 transactionDbHasSpace Checks if transaction database has available space. More...
 

Static Public Member Functions

static std::unique_ptr< RelationalDBInterfaceinit (Application &app, Config const &config, JobQueue &jobQueue)
 init Creates and returns appropriate interface based on config. More...
 

Detailed Description

Definition at line 27 of file RelationalDBInterfaceSqlite.h.

Member Typedef Documentation

◆ AccountTx

Definition at line 85 of file RelationalDBInterface.h.

◆ AccountTxs

Definition at line 86 of file RelationalDBInterface.h.

◆ txnMetaLedgerType

Definition at line 87 of file RelationalDBInterface.h.

◆ MetaTxsList

Definition at line 88 of file RelationalDBInterface.h.

◆ LedgerSequence

Definition at line 90 of file RelationalDBInterface.h.

◆ LedgerHash

Definition at line 91 of file RelationalDBInterface.h.

◆ LedgerShortcut

Definition at line 92 of file RelationalDBInterface.h.

◆ LedgerSpecifier

Definition at line 94 of file RelationalDBInterface.h.

Member Function Documentation

◆ getTransactionsMinLedgerSeq()

virtual std::optional<LedgerIndex> ripple::RelationalDBInterfaceSqlite::getTransactionsMinLedgerSeq ( )
pure virtual

getTransactionsMinLedgerSeq Returns minimum ledger sequence among records in the Transactions table.

Returns
Ledger sequence or none if no ledgers exist.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getAccountTransactionsMinLedgerSeq()

virtual std::optional<LedgerIndex> ripple::RelationalDBInterfaceSqlite::getAccountTransactionsMinLedgerSeq ( )
pure virtual

getAccountTransactionsMinLedgerSeq Returns minimum ledger sequence among records in the AccountTransactions table.

Returns
Ledger sequence or none if no ledgers exist.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ deleteTransactionByLedgerSeq()

virtual void ripple::RelationalDBInterfaceSqlite::deleteTransactionByLedgerSeq ( LedgerIndex  ledgerSeq)
pure virtual

deleteTransactionByLedgerSeq Deletes transactions from ledger with given sequence.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ deleteBeforeLedgerSeq()

virtual void ripple::RelationalDBInterfaceSqlite::deleteBeforeLedgerSeq ( LedgerIndex  ledgerSeq)
pure virtual

deleteBeforeLedgerSeq Deletes all ledgers with given sequence and all sequences below it.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ deleteTransactionsBeforeLedgerSeq()

virtual void ripple::RelationalDBInterfaceSqlite::deleteTransactionsBeforeLedgerSeq ( LedgerIndex  ledgerSeq)
pure virtual

deleteTransactionsBeforeLedgerSeq Deletes all transactions with given ledger sequence and all sequences below it.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ deleteAccountTransactionsBeforeLedgerSeq()

virtual void ripple::RelationalDBInterfaceSqlite::deleteAccountTransactionsBeforeLedgerSeq ( LedgerIndex  ledgerSeq)
pure virtual

deleteAccountTransactionsBeforeLedgerSeq Deletes all account transactions with given ledger sequence and all sequences below it.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getTransactionCount()

virtual std::size_t ripple::RelationalDBInterfaceSqlite::getTransactionCount ( )
pure virtual

getTransactionCount Returns number of transactions.

Returns
Number of transactions.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getAccountTransactionCount()

virtual std::size_t ripple::RelationalDBInterfaceSqlite::getAccountTransactionCount ( )
pure virtual

getAccountTransactionCount Returns number of account transactions.

Returns
Number of account transactions.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getLedgerCountMinMax()

virtual struct CountMinMax ripple::RelationalDBInterfaceSqlite::getLedgerCountMinMax ( )
pure virtual

getLedgerCountMinMax Returns minumum ledger sequence, maximum ledger sequence and total number of saved ledgers.

Returns
Struct CountMinMax which contain minimum sequence, maximum sequence and number of ledgers.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ saveValidatedLedger()

virtual bool ripple::RelationalDBInterfaceSqlite::saveValidatedLedger ( std::shared_ptr< Ledger const > const &  ledger,
bool  current 
)
pure virtual

saveValidatedLedger Saves ledger into database.

Parameters
ledgerThe ledger.
currentTrue if ledger is current.
Returns
True is saving was successfull.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getLimitedOldestLedgerInfo()

virtual std::optional<LedgerInfo> ripple::RelationalDBInterfaceSqlite::getLimitedOldestLedgerInfo ( LedgerIndex  ledgerFirstIndex)
pure virtual

getLimitedOldestLedgerInfo Returns info of oldest ledger from ledgers with sequences greater or equal to given.

Parameters
ledgerFirstIndexMinimum ledger sequence.
Returns
Ledger info or none if ledger not found.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getLimitedNewestLedgerInfo()

virtual std::optional<LedgerInfo> ripple::RelationalDBInterfaceSqlite::getLimitedNewestLedgerInfo ( LedgerIndex  ledgerFirstIndex)
pure virtual

getLimitedNewestLedgerInfo Returns info of newest ledger from ledgers with sequences greater or equal to given.

Parameters
ledgerFirstIndexMinimum ledger sequence.
Returns
Ledger info or none if ledger not found.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getOldestAccountTxs()

virtual AccountTxs ripple::RelationalDBInterfaceSqlite::getOldestAccountTxs ( AccountTxOptions const &  options)
pure virtual

getOldestAccountTxs Returns oldest transactions for given account which match given criteria starting from given offset.

Parameters
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
Returns
Vector of pairs of found transactions and their metadata sorted in ascending order by account sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getNewestAccountTxs()

virtual AccountTxs ripple::RelationalDBInterfaceSqlite::getNewestAccountTxs ( AccountTxOptions const &  options)
pure virtual

getNewestAccountTxs Returns newest transactions for given account which match given criteria starting from given offset.

Parameters
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
Returns
Vector of pairs of found transactions and their metadata sorted in descending order by account sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getOldestAccountTxsB()

virtual MetaTxsList ripple::RelationalDBInterfaceSqlite::getOldestAccountTxsB ( AccountTxOptions const &  options)
pure virtual

getOldestAccountTxsB Returns oldest transactions in binary form for given account which match given criteria starting from given offset.

Parameters
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in ascending order by account sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getNewestAccountTxsB()

virtual MetaTxsList ripple::RelationalDBInterfaceSqlite::getNewestAccountTxsB ( AccountTxOptions const &  options)
pure virtual

getNewestAccountTxsB Returns newest transactions in binary form for given account which match given criteria starting from given offset.

Parameters
optionsStruct AccountTxOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, offset of first entry to return, number of transactions to return, flag if this number unlimited.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in descending order by account sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ oldestAccountTxPage()

virtual std::pair<AccountTxs, std::optional<AccountTxMarker> > ripple::RelationalDBInterfaceSqlite::oldestAccountTxPage ( AccountTxPageOptions const &  options)
pure virtual

oldestAccountTxPage Returns oldest transactions for given account which match given criteria starting from given marker.

Parameters
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
Returns
Vector of pairs of found transactions and their metadata sorted in ascending order by account sequence and marker for next search if search not finished.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ newestAccountTxPage()

virtual std::pair<AccountTxs, std::optional<AccountTxMarker> > ripple::RelationalDBInterfaceSqlite::newestAccountTxPage ( AccountTxPageOptions const &  options)
pure virtual

newestAccountTxPage Returns newest transactions for given account which match given criteria starting from given marker.

Parameters
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
Returns
Vector of pairs of found transactions and their metadata sorted in descending order by account sequence and marker for next search if search not finished.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ oldestAccountTxPageB()

virtual std::pair<MetaTxsList, std::optional<AccountTxMarker> > ripple::RelationalDBInterfaceSqlite::oldestAccountTxPageB ( AccountTxPageOptions const &  options)
pure virtual

oldestAccountTxPageB Returns oldest transactions in binary form for given account which match given criteria starting from given marker.

Parameters
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in ascending order by account sequence and marker for next search if search not finished.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ newestAccountTxPageB()

virtual std::pair<MetaTxsList, std::optional<AccountTxMarker> > ripple::RelationalDBInterfaceSqlite::newestAccountTxPageB ( AccountTxPageOptions const &  options)
pure virtual

newestAccountTxPageB Returns newest transactions in binary form for given account which match given criteria starting from given marker.

Parameters
optionsStruct AccountTxPageOptions which contain criteria to match: the account, minimum and maximum ledger numbers to search, marker of first returned entry, number of transactions to return, flag if this number unlimited.
Returns
Vector of tuples of found transactions, their metadata and account sequences sorted in descending order by account sequence and marker for next search if search not finished.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getTransaction()

virtual std::variant<AccountTx, TxSearched> ripple::RelationalDBInterfaceSqlite::getTransaction ( uint256 const &  id,
std::optional< ClosedInterval< uint32_t >> const &  range,
error_code_i ec 
)
pure virtual

getTransaction Returns transaction with given hash.

If not found and range given then check if all ledgers from the range are present in the database.

Parameters
idHash of the transaction.
rangeRange of ledgers to check, if present.
ecDefault value of error code.
Returns
Transaction and its metadata if found, TxSearched::all if range given and all ledgers from range are present in the database, TxSearched::some if range given and not all ledgers are present, TxSearched::unknown if range not given or deserializing error occured. In the last case error code returned via ec link parameter, in other cases default error code not changed.

◆ getKBUsedAll()

virtual uint32_t ripple::RelationalDBInterfaceSqlite::getKBUsedAll ( )
pure virtual

getKBUsedAll Returns space used by all databases.

Returns
Space in kilobytes.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getKBUsedLedger()

virtual uint32_t ripple::RelationalDBInterfaceSqlite::getKBUsedLedger ( )
pure virtual

getKBUsedLedger Returns space used by ledger database.

Returns
Space in kilobytes.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ getKBUsedTransaction()

virtual uint32_t ripple::RelationalDBInterfaceSqlite::getKBUsedTransaction ( )
pure virtual

getKBUsedTransaction Returns space used by transaction database.

Returns
Space in kilobytes.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ closeLedgerDB()

virtual void ripple::RelationalDBInterfaceSqlite::closeLedgerDB ( )
pure virtual

Closes the ledger database.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ closeTransactionDB()

virtual void ripple::RelationalDBInterfaceSqlite::closeTransactionDB ( )
pure virtual

Closes the transaction database.

Implemented in ripple::RelationalDBInterfaceSqliteImp.

◆ init()

std::unique_ptr< RelationalDBInterface > ripple::RelationalDBInterface::init ( Application app,
Config const &  config,
JobQueue jobQueue 
)
staticinherited

init Creates and returns appropriate interface based on config.

Parameters
appApplication object.
configConfig object.
jobQueueJobQueue object.
Returns
Unique pointer to the interface.

Definition at line 40 of file RelationalDBInterface.cpp.

◆ getMinLedgerSeq()

virtual std::optional<LedgerIndex> ripple::RelationalDBInterface::getMinLedgerSeq ( )
pure virtualinherited

getMinLedgerSeq Returns minimum ledger sequence in Ledgers table.

Returns
Ledger sequence or none if no ledgers exist.

Implemented in ripple::RelationalDBInterfacePostgresImp, and ripple::RelationalDBInterfaceSqliteImp.

◆ getMaxLedgerSeq()

virtual std::optional<LedgerIndex> ripple::RelationalDBInterface::getMaxLedgerSeq ( )
pure virtualinherited

getMaxLedgerSeq Returns maximum ledger sequence in Ledgers table.

Returns
Ledger sequence or none if no ledgers exist.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getLedgerInfoByIndex()

virtual std::optional<LedgerInfo> ripple::RelationalDBInterface::getLedgerInfoByIndex ( LedgerIndex  ledgerSeq)
pure virtualinherited

getLedgerInfoByIndex Returns ledger by its sequence.

Parameters
ledgerSeqLedger sequence.
Returns
Ledger or none if ledger not found.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getNewestLedgerInfo()

virtual std::optional<LedgerInfo> ripple::RelationalDBInterface::getNewestLedgerInfo ( )
pure virtualinherited

getNewestLedgerInfo Returns info of newest saved ledger.

Returns
Ledger info or none if ledger not found.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getLedgerInfoByHash()

virtual std::optional<LedgerInfo> ripple::RelationalDBInterface::getLedgerInfoByHash ( uint256 const &  ledgerHash)
pure virtualinherited

getLedgerInfoByHash Returns info of ledger with given hash.

Parameters
ledgerHashHash of the ledger.
Returns
Ledger or none if ledger not found.

◆ getHashByIndex()

virtual uint256 ripple::RelationalDBInterface::getHashByIndex ( LedgerIndex  ledgerIndex)
pure virtualinherited

getHashByIndex Returns hash of ledger with given sequence.

Parameters
ledgerIndexLedger sequence.
Returns
Hash of the ledger.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getHashesByIndex() [1/2]

virtual std::optional<LedgerHashPair> ripple::RelationalDBInterface::getHashesByIndex ( LedgerIndex  ledgerIndex)
pure virtualinherited

getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence.

Parameters
ledgerIndexLedger sequence.
Returns
Struct LedgerHashPair which contain hashes of the ledger and its parent ledger.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getHashesByIndex() [2/2]

virtual std::map<LedgerIndex, LedgerHashPair> ripple::RelationalDBInterface::getHashesByIndex ( LedgerIndex  minSeq,
LedgerIndex  maxSeq 
)
pure virtualinherited

getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit.

Parameters
minSeqMinimum ledger sequence.
maxSeqMaximum ledger sequence.
Returns
Map which points sequence number of found ledger to the struct LedgerHashPair which contains ledger hash and its parent hash.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ getTxHistory()

virtual std::vector<std::shared_ptr<Transaction> > ripple::RelationalDBInterface::getTxHistory ( LedgerIndex  startIndex)
pure virtualinherited

getTxHistory Returns most recent 20 transactions starting from given number or entry.

Parameters
startIndexFirst number of returned entry.
Returns
Vector of sharded pointers to transactions sorted in descending order by ledger sequence.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ ledgerDbHasSpace()

virtual bool ripple::RelationalDBInterface::ledgerDbHasSpace ( Config const &  config)
pure virtualinherited

ledgerDbHasSpace Checks if ledger database has available space.

Parameters
configConfig object.
Returns
True if space is available.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.

◆ transactionDbHasSpace()

virtual bool ripple::RelationalDBInterface::transactionDbHasSpace ( Config const &  config)
pure virtualinherited

transactionDbHasSpace Checks if transaction database has available space.

Parameters
configConfig object.
Returns
True if space is available.

Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.