rippled
|
Classes | |
struct | AccountTransactionsData |
Struct used to keep track of what to write to transactions and account_transactions tables in Postgres. More... | |
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. More... | |
virtual std::optional< LedgerIndex > | getMaxLedgerSeq ()=0 |
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table. More... | |
virtual std::optional< LedgerInfo > | getLedgerInfoByIndex (LedgerIndex ledgerSeq)=0 |
getLedgerInfoByIndex Returns a ledger by its sequence. More... | |
virtual std::optional< LedgerInfo > | getNewestLedgerInfo ()=0 |
getNewestLedgerInfo Returns the info of the newest saved ledger. More... | |
virtual std::optional< LedgerInfo > | getLedgerInfoByHash (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< LedgerHashPair > | getHashesByIndex (LedgerIndex ledgerIndex)=0 |
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex. More... | |
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. 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< RelationalDatabase > | init (Application &app, Config const &config, JobQueue &jobQueue) |
init Creates and returns an appropriate RelationalDatabase instance based on configuration. More... | |
Definition at line 48 of file RelationalDatabase.h.
using ripple::RelationalDatabase::AccountTx = std::pair<std::shared_ptr<Transaction>, std::shared_ptr<TxMeta> > |
Definition at line 85 of file RelationalDatabase.h.
Definition at line 86 of file RelationalDatabase.h.
Definition at line 87 of file RelationalDatabase.h.
Definition at line 88 of file RelationalDatabase.h.
using ripple::RelationalDatabase::LedgerSequence = uint32_t |
Definition at line 90 of file RelationalDatabase.h.
Definition at line 91 of file RelationalDatabase.h.
Definition at line 92 of file RelationalDatabase.h.
using ripple::RelationalDatabase::LedgerSpecifier = std::variant<LedgerRange, LedgerShortcut, LedgerSequence, LedgerHash> |
Definition at line 94 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 34 of file RelationalDatabase.cpp.
|
pure virtual |
getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.
Implemented in ripple::PostgresDatabaseImp, and ripple::SQLiteDatabaseImp.
|
pure virtual |
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.
Implemented in ripple::PostgresDatabaseImp, and ripple::SQLiteDatabaseImp.
|
pure virtual |
getLedgerInfoByIndex Returns a ledger by its sequence.
ledgerSeq | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
getNewestLedgerInfo Returns the info of the newest saved ledger.
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
getLedgerInfoByHash Returns the info of the ledger with given hash.
ledgerHash | Hash of the ledger. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
getHashByIndex Returns the hash of the ledger with the given sequence.
ledgerIndex | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.
ledgerIndex | Ledger sequence. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
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, and ripple::PostgresDatabaseImp.
|
pure virtual |
getTxHistory Returns the 20 most recent transactions starting from the given number.
startIndex | First number of returned entry. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
ledgerDbHasSpace Checks if the ledger database has available space.
config | Config object. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.
|
pure virtual |
transactionDbHasSpace Checks if the transaction database has available space.
config | Config object. |
Implemented in ripple::SQLiteDatabaseImp, and ripple::PostgresDatabaseImp.