rippled
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ripple::SQLiteDatabase Class Referenceabstract
Inheritance diagram for ripple::SQLiteDatabase:
Inheritance graph
[legend]
Collaboration diagram for ripple::SQLiteDatabase:
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 the minimum ledger sequence stored in the Transactions table. More...
 
virtual std::optional< LedgerIndexgetAccountTransactionsMinLedgerSeq ()=0
 getAccountTransactionsMinLedgerSeq Returns the minimum ledger sequence stored in the AccountTransactions table. More...
 
virtual void deleteTransactionByLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteTransactionByLedgerSeq Deletes transactions from the ledger with the given sequence. More...
 
virtual void deleteBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteBeforeLedgerSeq Deletes all ledgers with a sequence number less than or equal to the given ledger sequence. More...
 
virtual void deleteTransactionsBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteTransactionsBeforeLedgerSeq Deletes all transactions with a sequence number less than or equal to the given ledger sequence. More...
 
virtual void deleteAccountTransactionsBeforeLedgerSeq (LedgerIndex ledgerSeq)=0
 deleteAccountTransactionsBeforeLedgerSeq Deletes all account transactions with a sequence number less than or equal to the given ledger sequence. More...
 
virtual std::size_t getTransactionCount ()=0
 getTransactionCount Returns the number of transactions. More...
 
virtual std::size_t getAccountTransactionCount ()=0
 getAccountTransactionCount Returns the number of account transactions. More...
 
virtual struct CountMinMax getLedgerCountMinMax ()=0
 getLedgerCountMinMax Returns the minimum 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 a ledger into the database. More...
 
virtual std::optional< LedgerInfogetLimitedOldestLedgerInfo (LedgerIndex ledgerFirstIndex)=0
 getLimitedOldestLedgerInfo Returns the info of the oldest ledger whose sequence number is greater than or equal to the given sequence number. More...
 
virtual std::optional< LedgerInfogetLimitedNewestLedgerInfo (LedgerIndex ledgerFirstIndex)=0
 getLimitedNewestLedgerInfo Returns the info of the newest ledger whose sequence number is greater than or equal to the given sequence number. More...
 
virtual AccountTxs getOldestAccountTxs (AccountTxOptions const &options)=0
 getOldestAccountTxs Returns the oldest transactions for the account that matches the given criteria starting from the provided offset. More...
 
virtual AccountTxs getNewestAccountTxs (AccountTxOptions const &options)=0
 getNewestAccountTxs Returns the newest transactions for the account that matches the given criteria starting from the provided offset. More...
 
virtual MetaTxsList getOldestAccountTxsB (AccountTxOptions const &options)=0
 getOldestAccountTxsB Returns the oldest transactions in binary form for the account that matches the given criteria starting from the provided offset. More...
 
virtual MetaTxsList getNewestAccountTxsB (AccountTxOptions const &options)=0
 getNewestAccountTxsB Returns the newest transactions in binary form for the account that matches the given criteria starting from the provided offset. More...
 
virtual std::pair< AccountTxs, std::optional< AccountTxMarker > > oldestAccountTxPage (AccountTxPageOptions const &options)=0
 oldestAccountTxPage Returns the oldest transactions for the account that matches the given criteria starting from the provided marker. More...
 
virtual std::pair< AccountTxs, std::optional< AccountTxMarker > > newestAccountTxPage (AccountTxPageOptions const &options)=0
 newestAccountTxPage Returns the newest transactions for the account that matches the given criteria starting from the provided marker. More...
 
virtual std::pair< MetaTxsList, std::optional< AccountTxMarker > > oldestAccountTxPageB (AccountTxPageOptions const &options)=0
 oldestAccountTxPageB Returns the oldest transactions in binary form for the account that matches the given criteria starting from the provided marker. More...
 
virtual std::pair< MetaTxsList, std::optional< AccountTxMarker > > newestAccountTxPageB (AccountTxPageOptions const &options)=0
 newestAccountTxPageB Returns the newest transactions in binary form for the account that matches the given criteria starting from the provided marker. More...
 
virtual std::variant< AccountTx, TxSearchedgetTransaction (uint256 const &id, std::optional< ClosedInterval< uint32_t >> const &range, error_code_i &ec)=0
 getTransaction Returns the transaction with the given hash. More...
 
virtual uint32_t getKBUsedAll ()=0
 getKBUsedAll Returns the amount of space used by all databases. More...
 
virtual uint32_t getKBUsedLedger ()=0
 getKBUsedLedger Returns the amount of space space used by the ledger database. More...
 
virtual uint32_t getKBUsedTransaction ()=0
 getKBUsedTransaction Returns the amount of space used by the 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 the minimum ledger sequence in the Ledgers table. More...
 
virtual std::optional< LedgerIndexgetMaxLedgerSeq ()=0
 getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table. More...
 
virtual std::optional< LedgerInfogetLedgerInfoByIndex (LedgerIndex ledgerSeq)=0
 getLedgerInfoByIndex Returns a ledger by its sequence. More...
 
virtual std::optional< LedgerInfogetNewestLedgerInfo ()=0
 getNewestLedgerInfo Returns the info of the newest saved ledger. More...
 
virtual std::optional< LedgerInfogetLedgerInfoByHash (uint256 const &ledgerHash)=0
 getLedgerInfoByHash Returns the info of the ledger with given hash. More...
 
virtual uint256 getHashByIndex (LedgerIndex ledgerIndex)=0
 getHashByIndex Returns the hash of the ledger with the given sequence. More...
 
virtual std::optional< LedgerHashPairgetHashesByIndex (LedgerIndex ledgerIndex)=0
 getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex. More...
 
virtual std::map< LedgerIndex, LedgerHashPairgetHashesByIndex (LedgerIndex minSeq, LedgerIndex maxSeq)=0
 getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range. More...
 
virtual std::vector< std::shared_ptr< Transaction > > getTxHistory (LedgerIndex startIndex)=0
 getTxHistory Returns the 20 most recent transactions starting from the given number. More...
 
virtual bool ledgerDbHasSpace (Config const &config)=0
 ledgerDbHasSpace Checks if the ledger database has available space. More...
 
virtual bool transactionDbHasSpace (Config const &config)=0
 transactionDbHasSpace Checks if the transaction database has available space. More...
 

Static Public Member Functions

static std::unique_ptr< RelationalDatabaseinit (Application &app, Config const &config, JobQueue &jobQueue)
 init Creates and returns an appropriate RelationalDatabase instance based on configuration. More...
 

Detailed Description

Definition at line 27 of file SQLiteDatabase.h.

Member Typedef Documentation

◆ AccountTx

Definition at line 85 of file RelationalDatabase.h.

◆ AccountTxs

Definition at line 86 of file RelationalDatabase.h.

◆ txnMetaLedgerType

Definition at line 87 of file RelationalDatabase.h.

◆ MetaTxsList

Definition at line 88 of file RelationalDatabase.h.

◆ LedgerSequence

using ripple::RelationalDatabase::LedgerSequence = uint32_t
inherited

Definition at line 90 of file RelationalDatabase.h.

◆ LedgerHash

Definition at line 91 of file RelationalDatabase.h.

◆ LedgerShortcut

Definition at line 92 of file RelationalDatabase.h.

◆ LedgerSpecifier

Definition at line 94 of file RelationalDatabase.h.

Member Function Documentation

◆ getTransactionsMinLedgerSeq()

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

getTransactionsMinLedgerSeq Returns the minimum ledger sequence stored in the Transactions table.

Returns
Ledger sequence or no value if no ledgers exist.

Implemented in ripple::SQLiteDatabaseImp.

◆ getAccountTransactionsMinLedgerSeq()

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

getAccountTransactionsMinLedgerSeq Returns the minimum ledger sequence stored in the AccountTransactions table.

Returns
Ledger sequence or no value if no ledgers exist.

Implemented in ripple::SQLiteDatabaseImp.

◆ deleteTransactionByLedgerSeq()

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

deleteTransactionByLedgerSeq Deletes transactions from the ledger with the given sequence.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::SQLiteDatabaseImp.

◆ deleteBeforeLedgerSeq()

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

deleteBeforeLedgerSeq Deletes all ledgers with a sequence number less than or equal to the given ledger sequence.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::SQLiteDatabaseImp.

◆ deleteTransactionsBeforeLedgerSeq()

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

deleteTransactionsBeforeLedgerSeq Deletes all transactions with a sequence number less than or equal to the given ledger sequence.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::SQLiteDatabaseImp.

◆ deleteAccountTransactionsBeforeLedgerSeq()

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

deleteAccountTransactionsBeforeLedgerSeq Deletes all account transactions with a sequence number less than or equal to the given ledger sequence.

Parameters
ledgerSeqLedger sequence.

Implemented in ripple::SQLiteDatabaseImp.

◆ getTransactionCount()

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

getTransactionCount Returns the number of transactions.

Returns
Number of transactions.

Implemented in ripple::SQLiteDatabaseImp.

◆ getAccountTransactionCount()

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

getAccountTransactionCount Returns the number of account transactions.

Returns
Number of account transactions.

Implemented in ripple::SQLiteDatabaseImp.

◆ getLedgerCountMinMax()

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

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

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

Implemented in ripple::SQLiteDatabaseImp.

◆ saveValidatedLedger()

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

saveValidatedLedger Saves a ledger into the database.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ getLimitedOldestLedgerInfo()

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

getLimitedOldestLedgerInfo Returns the info of the oldest ledger whose sequence number is greater than or equal to the given sequence number.

Parameters
ledgerFirstIndexMinimum ledger sequence.
Returns
Ledger info if found, otherwise no value.

Implemented in ripple::SQLiteDatabaseImp.

◆ getLimitedNewestLedgerInfo()

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

getLimitedNewestLedgerInfo Returns the info of the newest ledger whose sequence number is greater than or equal to the given sequence number.

Parameters
ledgerFirstIndexMinimum ledger sequence.
Returns
Ledger info if found, otherwise no value.

Implemented in ripple::SQLiteDatabaseImp.

◆ getOldestAccountTxs()

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

getOldestAccountTxs Returns the oldest transactions for the account that matches the given criteria starting from the provided offset.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ getNewestAccountTxs()

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

getNewestAccountTxs Returns the newest transactions for the account that matches the given criteria starting from the provided offset.

Parameters
optionsStruct AccountTxOptions which contains the criteria to match: the account, the ledger search range, the offset of the first entry to return, the number of transactions to return, a 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::SQLiteDatabaseImp.

◆ getOldestAccountTxsB()

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

getOldestAccountTxsB Returns the oldest transactions in binary form for the account that matches the given criteria starting from the provided offset.

Parameters
optionsStruct AccountTxOptions which contains the criteria to match: the account, the ledger search range, the offset of the first entry to return, the number of transactions to return, a 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::SQLiteDatabaseImp.

◆ getNewestAccountTxsB()

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

getNewestAccountTxsB Returns the newest transactions in binary form for the account that matches the given criteria starting from the provided offset.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ oldestAccountTxPage()

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

oldestAccountTxPage Returns the oldest transactions for the account that matches the given criteria starting from the provided marker.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ newestAccountTxPage()

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

newestAccountTxPage Returns the newest transactions for the account that matches the given criteria starting from the provided marker.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ oldestAccountTxPageB()

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

oldestAccountTxPageB Returns the oldest transactions in binary form for the account that matches the given criteria starting from the provided marker.

Parameters
optionsStruct AccountTxPageOptions which contains criteria to match: the account, the ledger search range, the marker of the first returned entry, the number of transactions to return, a 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 a marker for the next search if the search was not finished.

Implemented in ripple::SQLiteDatabaseImp.

◆ newestAccountTxPageB()

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

newestAccountTxPageB Returns the newest transactions in binary form for the account that matches the given criteria starting from the provided marker.

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

Implemented in ripple::SQLiteDatabaseImp.

◆ getTransaction()

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

getTransaction Returns the transaction with the given hash.

If a range is provided but the transaction is not found, then check if all ledgers in the range are present in the database.

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

◆ getKBUsedAll()

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

getKBUsedAll Returns the amount of space used by all databases.

Returns
Space in kilobytes.

Implemented in ripple::SQLiteDatabaseImp.

◆ getKBUsedLedger()

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

getKBUsedLedger Returns the amount of space space used by the ledger database.

Returns
Space in kilobytes.

Implemented in ripple::SQLiteDatabaseImp.

◆ getKBUsedTransaction()

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

getKBUsedTransaction Returns the amount of space used by the transaction database.

Returns
Space in kilobytes.

Implemented in ripple::SQLiteDatabaseImp.

◆ closeLedgerDB()

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

Closes the ledger database.

Implemented in ripple::SQLiteDatabaseImp.

◆ closeTransactionDB()

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

Closes the transaction database.

Implemented in ripple::SQLiteDatabaseImp.

◆ init()

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

init Creates and returns an appropriate RelationalDatabase instance based on configuration.

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

Definition at line 34 of file RelationalDatabase.cpp.

◆ getMinLedgerSeq()

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

getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.

Returns
Ledger sequence or no value if no ledgers exist.

Implemented in ripple::PostgresDatabaseImp, and ripple::SQLiteDatabaseImp.

◆ getMaxLedgerSeq()

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

getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.

Returns
Ledger sequence or none if no ledgers exist.

Implemented in ripple::PostgresDatabaseImp, and ripple::SQLiteDatabaseImp.

◆ getLedgerInfoByIndex()

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

getLedgerInfoByIndex Returns a ledger by its sequence.

Parameters
ledgerSeqLedger sequence.
Returns
The ledger if found, otherwise no value.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getNewestLedgerInfo()

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

getNewestLedgerInfo Returns the info of the newest saved ledger.

Returns
Ledger info if found, otherwise no value.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getLedgerInfoByHash()

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

getLedgerInfoByHash Returns the info of the ledger with given hash.

Parameters
ledgerHashHash of the ledger.
Returns
Ledger if found, otherwise no value.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getHashByIndex()

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

getHashByIndex Returns the hash of the ledger with the given sequence.

Parameters
ledgerIndexLedger sequence.
Returns
Hash of the ledger.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getHashesByIndex() [1/2]

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

getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.

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

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getHashesByIndex() [2/2]

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

getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range.

Parameters
minSeqMinimum ledger sequence.
maxSeqMaximum ledger sequence.
Returns
Container that maps the sequence number of a found ledger to the struct LedgerHashPair which contains the hashes of the ledger and its parent.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ getTxHistory()

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

getTxHistory Returns the 20 most recent transactions starting from the given number.

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

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ ledgerDbHasSpace()

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

ledgerDbHasSpace Checks if the ledger database has available space.

Parameters
configConfig object.
Returns
True if space is available.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.

◆ transactionDbHasSpace()

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

transactionDbHasSpace Checks if the transaction database has available space.

Parameters
configConfig object.
Returns
True if space is available.

Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.