3#include "data/Types.hpp"
4#include "migration/cassandra/CassandraMigrationBackend.hpp"
5#include "migration/cassandra/impl/FullTableScannerAdapterBase.hpp"
7#include <boost/asio/spawn.hpp>
8#include <xrpl/basics/base_uint.h>
9#include <xrpl/protocol/STLedgerEntry.h>
10#include <xrpl/protocol/STObject.h>
19namespace migration::cassandra::impl {
25 using Row = std::tuple<ripple::uint256, std::uint32_t, data::Blob>;
26 static constexpr char const* kPARTITION_KEY =
"key";
27 static constexpr char const* kTABLE_NAME =
"objects";
36 using OnStateRead = std::function<void(std::uint32_t, std::optional<ripple::SLE>)>;
45 std::shared_ptr<CassandraMigrationBackend> backend,
46 OnStateRead onStateRead
49 , onStateRead_{std::move(onStateRead)}
59 onRowRead(TableObjectsDesc::Row
const& row)
override;
62 OnStateRead onStateRead_;
ObjectsAdapter(std::shared_ptr< CassandraMigrationBackend > backend, OnStateRead onStateRead)
Construct a new Objects Adapter object.
Definition ObjectsAdapter.hpp:44
void onRowRead(TableObjectsDesc::Row const &row) override
Called when a row is read.
Definition ObjectsAdapter.cpp:12
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 objects table. It has to be a TableSpec.
Definition ObjectsAdapter.hpp:24