Validation of a CREATE MATERIALIZED VIEW statement takes place inside the prepare_schema_mutations() method. I would like to generate warnings during this validation, but there's currently no way to pass them. Let's add one more return value - a vector of CQL warnings generated during the execution of this statement. A new alias is added to make it clear what the function is returning: ```c++ // A vector of CQL warnings generated during execution of a statement. using cql_warnings_vec = std::vector<sstring>; ``` Later the warnings will be sent to the user by the function schema_altering_statment::execute(), which is the only caller of prepare_schema_mutations(). Signed-off-by: Jan Ciolek <jan.ciolek@scylladb.com>
26 lines
796 B
C++
26 lines
796 B
C++
/*
|
|
* Copyright (C) 2019-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "cql3/statements/function_statement.hh"
|
|
|
|
namespace cql3 {
|
|
class query_processor;
|
|
namespace statements {
|
|
class drop_function_statement final : public drop_function_statement_base {
|
|
virtual std::unique_ptr<prepared_statement> prepare(data_dictionary::database db, cql_stats& stats) override;
|
|
future<std::tuple<::shared_ptr<cql_transport::event::schema_change>, std::vector<mutation>, cql3::cql_warnings_vec>> prepare_schema_mutations(query_processor& qp, api::timestamp_type) const override;
|
|
|
|
public:
|
|
drop_function_statement(functions::function_name name, std::vector<shared_ptr<cql3_type::raw>> arg_types,
|
|
bool args_present, bool if_exists);
|
|
};
|
|
}
|
|
}
|