/* * Copyright (C) 2023-present ScyllaDB */ /* * SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 */ #pragma once #include #include #include "schema/schema_fwd.hh" namespace replica { class database; class table; class global_table_ptr { std::vector>> _p; std::vector>> _base; // relevant if _p is view or index std::vector>>>> _views; public: global_table_ptr(); global_table_ptr(global_table_ptr&&) noexcept = default; void assign(database& db, table_id uuid); table* operator->() const noexcept; table& operator*() const noexcept; std::vector>& views() const noexcept; void clear_views() noexcept; table& base() const noexcept; auto as_sharded_parameter() { return sharded_parameter([this] { return std::ref(**this); }); } }; future get_table_on_all_shards(sharded& db, table_id uuid); future get_table_on_all_shards(sharded& db, sstring ks_name, sstring cf_name); } // replica namespace