20 #ifndef RIPPLE_CORE_RELATIONALDBINTERFACE_POSTGRES_H_INCLUDED
21 #define RIPPLE_CORE_RELATIONALDBINTERFACE_POSTGRES_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/app/rdb/RelationalDBInterface.h>
27 #include <ripple/core/Pg.h>
std::optional< LedgerInfo > getLedgerInfoByIndex(soci::session &session, LedgerIndex ledgerSeq, beast::Journal j)
getLedgerInfoByIndex Returns ledger by its sequence.
std::pair< AccountTxResult, RPC::Status > getAccountTx(std::shared_ptr< PgPool > const &pgPool, AccountTxArgs const &args, Application &app, beast::Journal j)
getAccountTx Get last account transactions specifies by passed argumenrs structure.
std::pair< std::vector< std::shared_ptr< Transaction > >, int > getTxHistory(soci::session &session, Application &app, LedgerIndex startIndex, int quantity, bool count)
getTxHistory Returns given number of most recent transactions starting from given number of entry.
uint256 getHashByIndex(soci::session &session, LedgerIndex ledgerIndex)
getHashByIndex Returns hash of ledger with given sequence.
Struct used to keep track of what to write to transactions and account_transactions tables in Postgre...
std::optional< LedgerInfo > getLedgerInfoByHash(soci::session &session, uint256 const &ledgerHash, beast::Journal j)
getLedgerInfoByHash Returns info of ledger with given hash.
Transaction::Locator locateTransaction(std::shared_ptr< PgPool > const &pgPool, uint256 const &id, Application &app)
locateTransaction Returns information used to locate a transaction.
std::string getCompleteLedgers(std::shared_ptr< PgPool > const &pgPool)
getCompleteLedgers Returns string which contains list of completed ledgers
Integers of any length that is a multiple of 32-bits.
bool writeLedgerAndTransactions(std::shared_ptr< PgPool > const &pgPool, LedgerInfo const &info, std::vector< AccountTransactionsData > const &accountTxData, beast::Journal &j)
writeLedgerAndTransactions Write new ledger and transaction data to Postgres.
std::chrono::seconds getValidatedLedgerAge(std::shared_ptr< PgPool > const &pgPool, beast::Journal j)
getValidatedLedgerAge Returns age of last validated ledger
A generic endpoint for log messages.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::optional< LedgerHashPair > getHashesByIndex(soci::session &session, LedgerIndex ledgerIndex, beast::Journal j)
getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequenc...
Information about the notional ledger backing the view.
std::optional< LedgerIndex > getMinLedgerSeq(soci::session &session, TableType type)
getMinLedgerSeq Returns minimum ledger sequence in given table.
std::optional< LedgerInfo > getNewestLedgerInfo(soci::session &session, beast::Journal j)
getNewestLedgerInfo Returns info of newest saved ledger.
std::optional< LedgerIndex > getMaxLedgerSeq(soci::session &session, TableType type)
getMaxLedgerSeq Returns maximum ledger sequence in given table.
std::vector< uint256 > getTxHashes(std::shared_ptr< PgPool > const &pgPool, LedgerIndex seq, Application &app)
getTxHashes Returns vector of tx hashes by given ledger sequence