mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 20:27:03 +00:00
As check_restricted_table_properties() is invoked both within CREATE TABLE and ALTER TABLE CQL statements, we currently have no way to determine whether the operation was either a CREATE or ALTER. In many situations, it is important to be able to distinguish among both operations, such as - for example - whether a table already has a particular property set or if we are defining it within the statement. This patch simply adds a std::optional<schema_ptr> to check_restricted_table_properties() and updates its caller. Whenever a CREATE TABLE statement is issued, the method is called as a std::nullopt, whereas if an ALTER TABLE is issued instead, we call it with a schema_ptr.
4.8 KiB
4.8 KiB