22#include "migration/cassandra/CassandraMigrationBackend.hpp"
23#include "migration/cassandra/impl/FullTableScanner.hpp"
25#include <boost/asio/spawn.hpp>
30namespace migration::cassandra::impl {
39template <TableSpec TableDesc>
47 std::shared_ptr<CassandraMigrationBackend>
backend_;
70 backend_->migrateInTokenRange<TableDesc>(
71 range.start, range.end, [
this](
auto const& row) {
onRowRead(row); }, yield
The base class for the full table scanner adapter. It is responsible for reading the rows from the fu...
Definition FullTableScannerAdapterBase.hpp:40
void readByTokenRange(TokenRange const &range, boost::asio::yield_context yield)
Read the row in the given token range from database, this is the adapt function for the FullTableScan...
Definition FullTableScannerAdapterBase.hpp:68
FullTableScannerAdapterBase(std::shared_ptr< CassandraMigrationBackend > backend)
Construct a new Full Table Scanner Adapter Base object.
Definition FullTableScannerAdapterBase.hpp:57
std::shared_ptr< CassandraMigrationBackend > backend_
The backend to use.
Definition FullTableScannerAdapterBase.hpp:47
virtual void onRowRead(TableDesc::Row const &row)=0
Called when a row is read. The derived class should implement this function to convert the database b...
The token range used to split the full table scan into multiple ranges.
Definition FullTableScanner.hpp:42