Files
scylladb/cql3/operation_impl.hh
Avi Kivity 5937b1fa23 treewide: remove empty comments in top-of-files
After fcb8d040 ("treewide: use Software Package Data Exchange
(SPDX) license identifiers"), many dual-licensed files were
left with empty comments on top. Remove them to avoid visual
noise.

Closes #10562
2022-05-13 07:11:58 +02:00

65 lines
1.7 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 "operation.hh"
#include "constants.hh"
#include "maps.hh"
#include "sets.hh"
#include "lists.hh"
#include "user_types.hh"
namespace cql3 {
class operation::set_value : public raw_update {
protected:
expr::expression _value;
public:
set_value(expr::expression value) : _value(std::move(value)) {}
virtual ::shared_ptr <operation> prepare(data_dictionary::database db, const sstring& keyspace, const column_definition& receiver) const override;
#if 0
protected String toString(ColumnSpecification column)
{
return String.format("%s = %s", column, value);
}
#endif
virtual bool is_compatible_with(const std::unique_ptr<raw_update>& other) const override;
};
class operation::set_counter_value_from_tuple_list : public set_value {
public:
using set_value::set_value;
::shared_ptr <operation> prepare(data_dictionary::database db, const sstring& keyspace, const column_definition& receiver) const override;
};
class operation::column_deletion : public raw_deletion {
private:
::shared_ptr<column_identifier::raw> _id;
public:
column_deletion(::shared_ptr<column_identifier::raw> id)
: _id(std::move(id))
{ }
virtual const column_identifier::raw& affected_column() const override {
return *_id;
}
virtual ::shared_ptr<operation> prepare(data_dictionary::database db, const sstring& keyspace, const column_definition& receiver) const override {
// No validation, deleting a column is always "well typed"
return ::make_shared<constants::deleter>(receiver);
}
};
}