3#include "data/cassandra/Handle.hpp"
4#include "data/cassandra/Schema.hpp"
5#include "data/cassandra/SettingsProvider.hpp"
6#include "data/cassandra/Types.hpp"
13namespace migration::cassandra::impl {
21 std::reference_wrapper<SettingsProviderType const> settingsProvider_;
30 : settingsProvider_{settings}
42 data::cassandra::PreparedStatement
45 std::string
const& tableName,
46 std::string
const& key
54 WHERE TOKEN({}) >= ? AND TOKEN({}) <= ?
57 settingsProvider_.get(), tableName
71 data::cassandra::PreparedStatement
const&
74 static auto kPREPARED = handler.
prepare(
78 (migrator_name, status)
82 settingsProvider_.get(), "migrator_status"
Represents a handle to the cassandra database cluster.
Definition Handle.hpp:27
PreparedStatementType prepare(std::string_view query) const
Prepare a statement.
Definition Handle.cpp:149
Provides settings for BasicCassandraBackend.
Definition SettingsProvider.hpp:16
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:43
data::cassandra::PreparedStatement const & getPreparedInsertMigratedMigrator(data::cassandra::Handle const &handler)
Get the prepared statement for insertion of migrator_status table.
Definition CassandraMigrationSchema.hpp:68
CassandraMigrationSchema(SettingsProviderType const &settings)
Construct a new Cassandra Migration Schema object.
Definition CassandraMigrationSchema.hpp:29
std::string qualifiedTableName(SettingsProviderType const &provider, std::string_view name)
Returns the table name qualified with the keyspace and table prefix.
Definition Schema.hpp:27