Files
scylladb/db/view/base_info.hh
Avi Kivity 0ae22a09d4 LICENSE: Update to version 1.1
Updated terms of non-commercial use (must be a never-customer).
2026-04-12 19:46:33 +03:00

42 lines
1.2 KiB
C++

/*
* Copyright (C) 2025-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
*/
#pragma once
#include <optional>
#include "bytes_fwd.hh"
#include "schema/schema_fwd.hh"
namespace db {
namespace view {
// Part of the view description which depends on the base schema.
struct base_dependent_view_info {
bool has_computed_column_depending_on_base_non_primary_key;
// True if the partition key columns of the view are the same as the
// partition key columns of the base, maybe in a different order.
bool is_partition_key_permutation_of_base_partition_key;
// Indicates if the view hase pk columns which are not part of the base
// pk, it seems that !base_non_pk_columns_in_view_pk.empty() is the same,
// but actually there are cases where we can compute this boolean without
// succeeding to reliably build the former.
bool has_base_non_pk_columns_in_view_pk;
// A constructor for a base info that can facilitate reads and writes from the materialized view.
base_dependent_view_info(bool has_computed_column_depending_on_base_non_primary_key,
bool is_partition_key_permutation_of_base_partition_key,
bool has_base_non_pk_columns_in_view_pk);
};
}
}