auto recomputation fields are now available

This commit is contained in:
Priec
2026-07-16 00:46:47 +02:00
parent 53c7576872
commit fac1ada024
10 changed files with 23 additions and 9 deletions

Binary file not shown.

View File

@@ -91,6 +91,11 @@ pub struct ColumnDefinition {
/// MONEY rounding applied before a value is stored.
#[prost(enumeration = "MoneyRounding", tag = "4")]
pub rounding: i32,
/// When true, the submitted script result is validated normally and the
/// stored value is also refreshed when one of its dependencies later changes.
#[prost(bool, tag = "5")]
#[serde(default)]
pub recompute_on_dependency_change: bool,
}
/// Response after table creation (success + DDL preview).
#[derive(serde::Serialize, serde::Deserialize)]

View File

@@ -51,10 +51,6 @@ pub struct PostTableScriptRequest {
/// Optional. Free-text description stored alongside the script (no functional effect).
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// When true, changing any referenced field recomputes the target column.
/// When false, the script only validates direct writes to its own table.
#[prost(bool, tag = "5")]
pub recompute_on_dependency_change: bool,
}
/// Response after creating or updating a script.
#[derive(serde::Serialize, serde::Deserialize)]

View File

@@ -54,6 +54,10 @@ pub struct TableColumn {
/// Typically true for the "id" column created by the system.
#[prost(bool, tag = "4")]
pub is_primary_key: bool,
/// True for a user-defined column whose logic should be recomputed whenever
/// one of its dependencies changes. False for system and foreign-key columns.
#[prost(bool, tag = "5")]
pub recompute_on_dependency_change: bool,
}
/// Generated client implementations.
pub mod table_structure_service_client {