Files
scylladb/cql3/statements/prepared_statement.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

63 lines
1.8 KiB
C++

/*
* Copyright (C) 2016-present ScyllaDB
*
* Modified by ScyllaDB
*/
/*
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/
#pragma once
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/weak_ptr.hh>
#include <seastar/core/checked_ptr.hh>
#include <optional>
#include <vector>
#include "exceptions/exceptions.hh"
namespace cql3 {
class prepare_context;
class column_specification;
class cql_statement;
namespace statements {
struct invalidated_prepared_usage_attempt {
void operator()() const {
throw exceptions::invalidated_prepared_usage_attempt_exception();
}
};
class prepared_statement : public seastar::weakly_referencable<prepared_statement> {
public:
typedef seastar::checked_ptr<seastar::weak_ptr<prepared_statement>> checked_weak_ptr;
public:
const seastar::shared_ptr<cql_statement> statement;
const std::vector<seastar::lw_shared_ptr<column_specification>> bound_names;
std::vector<uint16_t> partition_key_bind_indices;
std::vector<sstring> warnings;
prepared_statement(seastar::shared_ptr<cql_statement> statement_, std::vector<seastar::lw_shared_ptr<column_specification>> bound_names_,
std::vector<uint16_t> partition_key_bind_indices, std::vector<sstring> warnings = {});
prepared_statement(seastar::shared_ptr<cql_statement> statement_, const prepare_context& ctx, const std::vector<uint16_t>& partition_key_bind_indices,
std::vector<sstring> warnings = {});
prepared_statement(seastar::shared_ptr<cql_statement> statement_, prepare_context&& ctx, std::vector<uint16_t>&& partition_key_bind_indices);
prepared_statement(seastar::shared_ptr<cql_statement>&& statement_);
checked_weak_ptr checked_weak_from_this() {
return checked_weak_ptr(this->weak_from_this());
}
};
}
}