Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
migration::cassandra::impl::FullTableScannerAdapterBase< TableDesc > Struct Template Referenceabstract

The base class for the full table scanner adapter. It is responsible for reading the rows from the full table scanner and call the callback when a row is read. With this base class, each table adapter can focus on the actual row data converting. More...

#include <FullTableScannerAdapterBase.hpp>

Public Member Functions

 FullTableScannerAdapterBase (std::shared_ptr< CassandraMigrationBackend > backend)
 Construct a new Full Table Scanner Adapter Base object.
 
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 FullTableScanner.
 
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 blob to actual data type.
 

Protected Attributes

std::shared_ptr< CassandraMigrationBackendbackend_
 The backend to use.
 

Detailed Description

template<TableSpec TableDesc>
struct migration::cassandra::impl::FullTableScannerAdapterBase< TableDesc >

The base class for the full table scanner adapter. It is responsible for reading the rows from the full table scanner and call the callback when a row is read. With this base class, each table adapter can focus on the actual row data converting.

Template Parameters
TableDescThe table description, it has to be a TableSpec.

Constructor & Destructor Documentation

◆ FullTableScannerAdapterBase()

template<TableSpec TableDesc>
migration::cassandra::impl::FullTableScannerAdapterBase< TableDesc >::FullTableScannerAdapterBase ( std::shared_ptr< CassandraMigrationBackend > backend)
inline

Construct a new Full Table Scanner Adapter Base object.

Parameters
backendThe backend

Member Function Documentation

◆ onRowRead()

template<TableSpec TableDesc>
virtual void migration::cassandra::impl::FullTableScannerAdapterBase< TableDesc >::onRowRead ( TableDesc::Row const & row)
pure virtual

Called when a row is read. The derived class should implement this function to convert the database blob to actual data type.

Parameters
rowThe row read

◆ readByTokenRange()

template<TableSpec TableDesc>
void migration::cassandra::impl::FullTableScannerAdapterBase< TableDesc >::readByTokenRange ( TokenRange const & range,
boost::asio::yield_context yield )
inline

Read the row in the given token range from database, this is the adapt function for the FullTableScanner.

Parameters
rangeThe token range to read
yieldThe yield context

The documentation for this struct was generated from the following file: