22#include "data/cassandra/Handle.hpp"
23#include "data/cassandra/Schema.hpp"
24#include "data/cassandra/SettingsProvider.hpp"
25#include "data/cassandra/Types.hpp"
32namespace migration::cassandra::impl {
39 std::reference_wrapper<SettingsProviderType const> settingsProvider_;
62 std::string
const& tableName,
63 std::string
const& key
66 return handler.
prepare(fmt::format(
70 WHERE TOKEN({}) >= ? AND TOKEN({}) <= ?
87 static auto kPREPARED = handler.
prepare(fmt::format(
90 (migrator_name, status)
Represents a handle to the cassandra database cluster.
Definition Handle.hpp:46
PreparedStatementType prepare(std::string_view query) const
Prepare a statement.
Definition Handle.cpp:156
Provides settings for BasicCassandraBackend.
Definition SettingsProvider.hpp:35
Represents a prepared statement on the DB side.
Definition Statement.hpp:155
The schema for the migration process. It contains the prepared statements only used for the migration...
Definition CassandraMigrationSchema.hpp:37
data::cassandra::PreparedStatement getPreparedFullScanStatement(data::cassandra::Handle const &handler, std::string const &tableName, std::string const &key)
Get the prepared statement for the full scan of a table.
Definition CassandraMigrationSchema.hpp:60
data::cassandra::PreparedStatement const & getPreparedInsertMigratedMigrator(data::cassandra::Handle const &handler)
Get the prepared statement for insertion of migrator_status table.
Definition CassandraMigrationSchema.hpp:81
CassandraMigrationSchema(SettingsProviderType const &settings)
Construct a new Cassandra Migration Schema object.
Definition CassandraMigrationSchema.hpp:47
std::string qualifiedTableName(SettingsProviderType const &provider, std::string_view name)
Returns the table name qualified with the keyspace and table prefix.
Definition Schema.hpp:46