mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 02:50:33 +00:00
To reduce future header fan-in, deinline all non-trivial functions. While these aer on the hot path, they can't be inlined anyway as they're virtual, and they're quite heavy anyway.
69 lines
2.0 KiB
C++
69 lines
2.0 KiB
C++
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "cql3/query_options.hh"
|
|
#include "cql3/update_parameters.hh"
|
|
#include "cql3/operation.hh"
|
|
#include "cql3/values.hh"
|
|
#include "mutation/mutation.hh"
|
|
#include <seastar/core/shared_ptr.hh>
|
|
|
|
namespace service::broadcast_tables {
|
|
class update_query;
|
|
}
|
|
|
|
namespace cql3 {
|
|
|
|
/**
|
|
* Static helper methods and classes for constants.
|
|
*/
|
|
class constants {
|
|
public:
|
|
#if 0
|
|
private static final Logger logger = LoggerFactory.getLogger(Constants.class);
|
|
#endif
|
|
public:
|
|
class setter : public operation_skip_if_unset {
|
|
public:
|
|
using operation_skip_if_unset::operation_skip_if_unset;
|
|
|
|
virtual void execute(mutation& m, const clustering_key_prefix& prefix, const update_parameters& params) override;
|
|
|
|
static void execute(mutation& m, const clustering_key_prefix& prefix, const update_parameters& params, const column_definition& column, cql3::raw_value_view value);
|
|
|
|
virtual void prepare_for_broadcast_tables(statements::broadcast_tables::prepared_update& query) const override;
|
|
};
|
|
|
|
struct adder final : operation_skip_if_unset {
|
|
using operation_skip_if_unset::operation_skip_if_unset;
|
|
|
|
virtual void execute(mutation& m, const clustering_key_prefix& prefix, const update_parameters& params) override;
|
|
};
|
|
|
|
struct subtracter final : operation_skip_if_unset {
|
|
using operation_skip_if_unset::operation_skip_if_unset;
|
|
|
|
virtual void execute(mutation& m, const clustering_key_prefix& prefix, const update_parameters& params) override;
|
|
};
|
|
|
|
class deleter : public operation_no_unset_support {
|
|
public:
|
|
deleter(const column_definition& column)
|
|
: operation_no_unset_support(column, std::nullopt)
|
|
{ }
|
|
|
|
virtual void execute(mutation& m, const clustering_key_prefix& prefix, const update_parameters& params) override;
|
|
};
|
|
};
|
|
|
|
}
|