exchange broker options
This commit is contained in:
@@ -85,6 +85,7 @@ impl TableSummary {
|
||||
pub(crate) struct TableDetailView {
|
||||
pub id: i64,
|
||||
pub row_version: i64,
|
||||
pub has_data: bool,
|
||||
pub row_display_columns: Vec<String>,
|
||||
pub columns: Vec<DetailColumn>,
|
||||
pub scripts: Vec<ScriptView>,
|
||||
@@ -377,6 +378,12 @@ pub(crate) struct TableDefinitionPageState {
|
||||
}
|
||||
|
||||
impl TableDefinitionPageState {
|
||||
/// Empty dynamic tables may be reshaped atomically. Once data exists, the
|
||||
/// backend deliberately exposes only append-only column changes.
|
||||
pub(crate) fn can_adjust_definition(&self) -> bool {
|
||||
self.table_is_writable() && self.detail.as_ref().is_some_and(|detail| !detail.has_data)
|
||||
}
|
||||
|
||||
pub(crate) fn column_is_selected_for_removal(&self, column_id: &i64) -> bool {
|
||||
self.remove_column_ids.contains(column_id)
|
||||
}
|
||||
@@ -486,6 +493,7 @@ mod tests {
|
||||
let detail = TableDetailView {
|
||||
id: 1,
|
||||
row_version: 1,
|
||||
has_data: false,
|
||||
row_display_columns: Vec::new(),
|
||||
scripts: Vec::new(),
|
||||
columns: vec![
|
||||
|
||||
Reference in New Issue
Block a user