mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
Because we'll be doing group0 operations we need to run on shard 0. Additional benefit is that with needs_guard set query_processor will also do automatic retries in case of concurrent group0 operations.
39 lines
882 B
C++
39 lines
882 B
C++
/*
|
|
* Copyright 2016-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "cql3/cql_statement.hh"
|
|
#include "raw/parsed_statement.hh"
|
|
|
|
namespace cql3 {
|
|
|
|
namespace statements {
|
|
|
|
class authentication_statement : public raw::parsed_statement, public cql_statement_no_metadata {
|
|
public:
|
|
authentication_statement() : cql_statement_no_metadata(&timeout_config::other_timeout) {}
|
|
|
|
uint32_t get_bound_terms() const override;
|
|
|
|
bool depends_on(std::string_view ks_name, std::optional<std::string_view> cf_name) const override;
|
|
|
|
future<> check_access(query_processor& qp, const service::client_state& state) const override;
|
|
};
|
|
|
|
class authentication_altering_statement : public authentication_statement {
|
|
public:
|
|
virtual bool needs_guard(query_processor& qp) const override;
|
|
};
|
|
|
|
}
|
|
|
|
}
|