diff --git a/client b/client index e17321c9..1d7d88e4 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit e17321c951fd3b1d18d2b10ecd0966742091abcc +Subproject commit 1d7d88e4c6640c3172afd45be18a1f1cea51c584 diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index b443afc5..a0d9d328 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -62,7 +62,9 @@ message PostTableDefinitionRequest { // two are named side by side. The "_id" suffix is allowed. string table_name = 1; - // The table's columns, including its links. System columns are added on top. + // The table's columns, including its links and stored linked projections. + // A projection uses field_type FROM(link_column.source_column); its physical + // type and money metadata are inferred from the linked source column. repeated ColumnDefinition columns = 3; // Column names to index, matching names declared above. System columns @@ -139,6 +141,7 @@ message AddTableColumnsRequest { string table_name = 2; // New user-defined columns only. Existing columns cannot be changed here. + // Stored linked projections use field_type FROM(link_column.source_column). repeated ColumnDefinition columns = 3; // Optional indexes for the new columns only. @@ -188,6 +191,9 @@ message ColumnDefinition { // LINK(table) → BIGINT referencing that table in the same profile, indexed // automatically. A table may hold several links to the same // target as long as the columns are named differently. + // FROM(link.source) → stored, read-only copy of an atomic column reached + // through another column in this definition whose type is + // LINK(...). SQL type and money metadata are inferred. // DECIMAL args must be integers (no sign, no dot, no leading zeros); // s ≤ p and p ≥ 1. string field_type = 2; diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index f404c4dc..8a1045f9 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.table_definition.rs b/common/src/proto/komp_ac.table_definition.rs index e5a680fa..d870c9c1 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -11,7 +11,9 @@ pub struct PostTableDefinitionRequest { /// two are named side by side. The "\_id" suffix is allowed. #[prost(string, tag = "1")] pub table_name: ::prost::alloc::string::String, - /// The table's columns, including its links. System columns are added on top. + /// The table's columns, including its links and stored linked projections. + /// A projection uses field_type FROM(link_column.source_column); its physical + /// type and money metadata are inferred from the linked source column. #[prost(message, repeated, tag = "3")] pub columns: ::prost::alloc::vec::Vec, /// Column names to index, matching names declared above. System columns @@ -102,6 +104,7 @@ pub struct AddTableColumnsRequest { #[prost(string, tag = "2")] pub table_name: ::prost::alloc::string::String, /// New user-defined columns only. Existing columns cannot be changed here. + /// Stored linked projections use field_type FROM(link_column.source_column). #[prost(message, repeated, tag = "3")] pub columns: ::prost::alloc::vec::Vec, /// Optional indexes for the new columns only. @@ -147,6 +150,9 @@ pub struct ColumnDefinition { /// LINK(table) → BIGINT referencing that table in the same profile, indexed /// automatically. A table may hold several links to the same /// target as long as the columns are named differently. + /// FROM(link.source) → stored, read-only copy of an atomic column reached + /// through another column in this definition whose type is + /// LINK(...). SQL type and money metadata are inferred. /// DECIMAL args must be integers (no sign, no dot, no leading zeros); /// s ≤ p and p ≥ 1. #[prost(string, tag = "2")] diff --git a/server b/server index 195db2f0..5b6b8603 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 195db2f04a8bb514e3a73bb112ecea486da5e08d +Subproject commit 5b6b860372459553eced168717d4dd4ecc639a26