|
rippled
|
#include <RelationalDatabase.h>

Classes | |
| struct | AccountTxArgs |
| struct | AccountTxMarker |
| struct | AccountTxOptions |
| struct | AccountTxPageOptions |
| struct | AccountTxResult |
| struct | CountMinMax |
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 | ~RelationalDatabase ()=default |
| virtual std::optional< LedgerIndex > | getMinLedgerSeq ()=0 |
| getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table. | |
| virtual std::optional< LedgerIndex > | getMaxLedgerSeq ()=0 |
| getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table. | |
| virtual std::optional< LedgerInfo > | getLedgerInfoByIndex (LedgerIndex ledgerSeq)=0 |
| getLedgerInfoByIndex Returns a ledger by its sequence. | |
| virtual std::optional< LedgerInfo > | getNewestLedgerInfo ()=0 |
| getNewestLedgerInfo Returns the info of the newest saved ledger. | |
| virtual std::optional< LedgerInfo > | getLedgerInfoByHash (uint256 const &ledgerHash)=0 |
| getLedgerInfoByHash Returns the info of the ledger with given hash. | |
| virtual uint256 | getHashByIndex (LedgerIndex ledgerIndex)=0 |
| getHashByIndex Returns the hash of the ledger with the given sequence. | |
| virtual std::optional< LedgerHashPair > | getHashesByIndex (LedgerIndex ledgerIndex)=0 |
| getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex. | |
| virtual std::map< LedgerIndex, LedgerHashPair > | getHashesByIndex (LedgerIndex minSeq, LedgerIndex maxSeq)=0 |
| getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range. | |
| virtual std::vector< std::shared_ptr< Transaction > > | getTxHistory (LedgerIndex startIndex)=0 |
| getTxHistory Returns the 20 most recent transactions starting from the given number. | |
| virtual bool | ledgerDbHasSpace (Config const &config)=0 |
| ledgerDbHasSpace Checks if the ledger database has available space. | |
| virtual bool | transactionDbHasSpace (Config const &config)=0 |
| transactionDbHasSpace Checks if the transaction database has available space. | |
Static Public Member Functions | |
| static std::unique_ptr< RelationalDatabase > | init (Application &app, Config const &config, JobQueue &jobQueue) |
| init Creates and returns an appropriate RelationalDatabase instance based on configuration. | |
Definition at line 30 of file RelationalDatabase.h.
| using ripple::RelationalDatabase::AccountTx = std::pair<std::shared_ptr<Transaction>, std::shared_ptr<TxMeta> > |
Definition at line 66 of file RelationalDatabase.h.
Definition at line 68 of file RelationalDatabase.h.
Definition at line 69 of file RelationalDatabase.h.
Definition at line 70 of file RelationalDatabase.h.
| using ripple::RelationalDatabase::LedgerSequence = uint32_t |
Definition at line 72 of file RelationalDatabase.h.
Definition at line 73 of file RelationalDatabase.h.
Definition at line 74 of file RelationalDatabase.h.
| using ripple::RelationalDatabase::LedgerSpecifier = std::variant<LedgerRange, LedgerShortcut, LedgerSequence, LedgerHash> |
Definition at line 75 of file RelationalDatabase.h.
|
virtualdefault |
|
static |
init Creates and returns an appropriate RelationalDatabase instance based on configuration.
| app | Application object. |
| config | Config object. |
| jobQueue | JobQueue object. |
Definition at line 11 of file RelationalDatabase.cpp.
|
pure virtual |
getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getLedgerInfoByIndex Returns a ledger by its sequence.
| ledgerSeq | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getNewestLedgerInfo Returns the info of the newest saved ledger.
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getLedgerInfoByHash Returns the info of the ledger with given hash.
| ledgerHash | Hash of the ledger. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getHashByIndex Returns the hash of the ledger with the given sequence.
| ledgerIndex | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.
| ledgerIndex | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range.
| minSeq | Minimum ledger sequence. |
| maxSeq | Maximum ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
getTxHistory Returns the 20 most recent transactions starting from the given number.
| startIndex | First number of returned entry. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
ledgerDbHasSpace Checks if the ledger database has available space.
| config | Config object. |
Implemented in ripple::SQLiteDatabaseImp.
|
pure virtual |
transactionDbHasSpace Checks if the transaction database has available space.
| config | Config object. |
Implemented in ripple::SQLiteDatabaseImp.