tui-pages changes and enum for what is allowed on a global table that the modules uses
This commit is contained in:
Binary file not shown.
@@ -693,6 +693,12 @@ pub struct TableDetail {
|
||||
/// True when module-owned storage supports catalog-managed rows and settings.
|
||||
#[prost(bool, tag = "14")]
|
||||
pub catalog_managed: bool,
|
||||
/// Supported catalog operations, not user permissions or a guarantee that a
|
||||
/// particular request is valid. Column restrictions, locks, existing data and
|
||||
/// optimistic concurrency checks still apply. Unknown values must be ignored.
|
||||
#[prost(enumeration = "CatalogFeature", repeated, tag = "15")]
|
||||
#[serde(default)]
|
||||
pub catalog_features: ::prost::alloc::vec::Vec<i32>,
|
||||
}
|
||||
/// Server-owned behavior for one logical column returned in table details.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -1234,6 +1240,72 @@ impl ManagedTableKind {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum CatalogFeature {
|
||||
Unspecified = 0,
|
||||
WriteRows = 1,
|
||||
DeleteRows = 2,
|
||||
ArchiveRows = 3,
|
||||
ColumnPresentation = 4,
|
||||
ColumnRequired = 5,
|
||||
ColumnFormVisibility = 6,
|
||||
ColumnOptionAliases = 7,
|
||||
RowDisplayColumns = 8,
|
||||
Validation = 9,
|
||||
Scripts = 10,
|
||||
AddColumns = 11,
|
||||
ReplaceDefinition = 12,
|
||||
Indexes = 13,
|
||||
DeleteTable = 14,
|
||||
}
|
||||
impl CatalogFeature {
|
||||
/// String value of the enum field names used in the ProtoBuf definition.
|
||||
///
|
||||
/// The values are not transformed in any way and thus are considered stable
|
||||
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
||||
pub fn as_str_name(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Unspecified => "CATALOG_FEATURE_UNSPECIFIED",
|
||||
Self::WriteRows => "CATALOG_FEATURE_WRITE_ROWS",
|
||||
Self::DeleteRows => "CATALOG_FEATURE_DELETE_ROWS",
|
||||
Self::ArchiveRows => "CATALOG_FEATURE_ARCHIVE_ROWS",
|
||||
Self::ColumnPresentation => "CATALOG_FEATURE_COLUMN_PRESENTATION",
|
||||
Self::ColumnRequired => "CATALOG_FEATURE_COLUMN_REQUIRED",
|
||||
Self::ColumnFormVisibility => "CATALOG_FEATURE_COLUMN_FORM_VISIBILITY",
|
||||
Self::ColumnOptionAliases => "CATALOG_FEATURE_COLUMN_OPTION_ALIASES",
|
||||
Self::RowDisplayColumns => "CATALOG_FEATURE_ROW_DISPLAY_COLUMNS",
|
||||
Self::Validation => "CATALOG_FEATURE_VALIDATION",
|
||||
Self::Scripts => "CATALOG_FEATURE_SCRIPTS",
|
||||
Self::AddColumns => "CATALOG_FEATURE_ADD_COLUMNS",
|
||||
Self::ReplaceDefinition => "CATALOG_FEATURE_REPLACE_DEFINITION",
|
||||
Self::Indexes => "CATALOG_FEATURE_INDEXES",
|
||||
Self::DeleteTable => "CATALOG_FEATURE_DELETE_TABLE",
|
||||
}
|
||||
}
|
||||
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||
match value {
|
||||
"CATALOG_FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
|
||||
"CATALOG_FEATURE_WRITE_ROWS" => Some(Self::WriteRows),
|
||||
"CATALOG_FEATURE_DELETE_ROWS" => Some(Self::DeleteRows),
|
||||
"CATALOG_FEATURE_ARCHIVE_ROWS" => Some(Self::ArchiveRows),
|
||||
"CATALOG_FEATURE_COLUMN_PRESENTATION" => Some(Self::ColumnPresentation),
|
||||
"CATALOG_FEATURE_COLUMN_REQUIRED" => Some(Self::ColumnRequired),
|
||||
"CATALOG_FEATURE_COLUMN_FORM_VISIBILITY" => Some(Self::ColumnFormVisibility),
|
||||
"CATALOG_FEATURE_COLUMN_OPTION_ALIASES" => Some(Self::ColumnOptionAliases),
|
||||
"CATALOG_FEATURE_ROW_DISPLAY_COLUMNS" => Some(Self::RowDisplayColumns),
|
||||
"CATALOG_FEATURE_VALIDATION" => Some(Self::Validation),
|
||||
"CATALOG_FEATURE_SCRIPTS" => Some(Self::Scripts),
|
||||
"CATALOG_FEATURE_ADD_COLUMNS" => Some(Self::AddColumns),
|
||||
"CATALOG_FEATURE_REPLACE_DEFINITION" => Some(Self::ReplaceDefinition),
|
||||
"CATALOG_FEATURE_INDEXES" => Some(Self::Indexes),
|
||||
"CATALOG_FEATURE_DELETE_TABLE" => Some(Self::DeleteTable),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
/// How a column type is spelled in ColumnDefinition.field_type.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
|
||||
Reference in New Issue
Block a user