3#include "migration/cassandra/CassandraMigrationBackend.hpp"
4#include "migration/cassandra/impl/FullTableScannerAdapterBase.hpp"
6#include <boost/asio/spawn.hpp>
7#include <xrpl/basics/Blob.h>
8#include <xrpl/basics/base_uint.h>
9#include <xrpl/protocol/STTx.h>
10#include <xrpl/protocol/TxMeta.h>
18namespace migration::cassandra::impl {
25 using Row = std::tuple<xrpl::uint256, std::uint64_t, std::uint32_t, xrpl::Blob, xrpl::Blob>;
26 static constexpr char const* kPartitionKey =
"hash";
27 static constexpr char const* kTableName =
"transactions";
36 using OnTransactionRead = std::function<void(xrpl::STTx, xrpl::TxMeta)>;
45 std::shared_ptr<CassandraMigrationBackend> backend,
46 OnTransactionRead onTxRead
49 , onTransactionRead_{std::move(onTxRead)}
59 onRowRead(TableTransactionsDesc::Row
const& row)
override;
62 OnTransactionRead onTransactionRead_;
TransactionsAdapter(std::shared_ptr< CassandraMigrationBackend > backend, OnTransactionRead onTxRead)
Construct a new Transactions Adapter object.
Definition TransactionsAdapter.hpp:44
void onRowRead(TableTransactionsDesc::Row const &row) override
The callback when a row is read.
Definition TransactionsAdapter.cpp:10
The base class for the full table scanner adapter. It is responsible for reading the rows from the fu...
Definition FullTableScannerAdapterBase.hpp:21
FullTableScannerAdapterBase(std::shared_ptr< CassandraMigrationBackend > backend)
Definition FullTableScannerAdapterBase.hpp:38
The description of the transactions table. It has to be a TableSpec.
Definition TransactionsAdapter.hpp:23