diff --git a/include/yugawara/storage/column_feature.h b/include/yugawara/storage/column_feature.h index 6131295..9670bfa 100644 --- a/include/yugawara/storage/column_feature.h +++ b/include/yugawara/storage/column_feature.h @@ -17,17 +17,24 @@ namespace yugawara::storage { enum class column_feature { /** * @brief the target column is defined by the system (NOT explicitly defined by a user). - * @details users must not treat these columns directly. + * @details users cannot access these columns. */ synthesized = 0, /** * @brief the target column is hidden from the user. - * @details hidden columns are ignored the following operations: + * @details these columns are ignored the following operations: * - `SELECT *` * - `NATURAL JOIN`, and similar column name based matching (e.g. `UNION CORRESPONDING`) */ hidden = 1, + + /** + * @brief the target column is read-only. + * @details The read-only columns are created or update only with its default value. + * @attention The compiler does not treat this feature. + */ + read_only = 2, }; /** @@ -36,7 +43,7 @@ enum class column_feature { using column_feature_set = ::takatori::util::enum_set< column_feature, column_feature::synthesized, - column_feature::hidden>; + column_feature::read_only>; /** * @brief returns string representation of the value. @@ -49,6 +56,7 @@ inline constexpr std::string_view to_string_view(column_feature value) noexcept switch (value) { case kind::synthesized: return "synthesized"sv; case kind::hidden: return "hidden"sv; + case kind::read_only: return "read_only"sv; } std::abort(); }