with index get column dep. removed

This commit is contained in:
Priec
2026-07-15 18:34:02 +02:00
parent 4b12635063
commit 1a189363b8
8 changed files with 24 additions and 24 deletions

View File

@@ -126,10 +126,9 @@ message ColumnDefinition {
// s ≤ p and p ≥ 1.
string field_type = 2;
// Once initially stored, this column can never be changed.
bool immutable = 3;
reserved 3;
// MONEY rounding applied before an immutable value is initially stored.
// MONEY rounding applied before a value is stored.
MoneyRounding rounding = 4;
}

View File

@@ -24,7 +24,7 @@ service TableScript {
// - Validates math operations: prohibits using certain data types in math
// - Enforces link constraints for structured table access:
// • Allowed always: self-references (same table)
// • Structured access via steel_get_column / steel_get_column_with_index
// • Structured access via steel_get_column
// requires an explicit link in table_definition_links
// • Raw SQL access via steel_query_sql is permitted (still validated)
// - Detects and rejects circular dependencies across all scripts in the schema
@@ -67,8 +67,6 @@ message PostTableScriptRequest {
// Referencing data:
// - Structured table/column access (enforces link constraints):
// (steel_get_column "table_name" "column_name")
// (steel_get_column_with_index "table_name" index "column_name")
// • index must be a non-negative integer literal
// • self-references are allowed without links
// • other tables require an explicit link from the source table
// (table_definition_links) or the request fails
@@ -87,13 +85,17 @@ message PostTableScriptRequest {
// BIGINT, TEXT, BOOLEAN, DATE, TIMESTAMPTZ
//
// Dependency tracking and cycles:
// - Dependencies are extracted from steel_get_column(_with_index), get-var,
// - Dependencies are extracted from steel_get_column, get-var,
// and steel_query_sql and stored in script_dependencies with context
// - Cycles across tables are rejected (self-dependency is allowed)
string script = 3;
// Optional. Free-text description stored alongside the script (no functional effect).
string description = 4;
// When true, changing any referenced field recomputes the target column.
// When false, the script only validates direct writes to its own table.
bool recompute_on_dependency_change = 5;
}
// Response after creating or updating a script.
@@ -128,12 +130,12 @@ message StoredTableScript {
string script = 4;
string description = 5;
repeated ScriptDependency dependencies = 6;
bool recompute_on_dependency_change = 7;
}
message ScriptDependency {
string target_table = 1;
string dependency_type = 2;
string column = 3;
int64 index = 4;
string query_fragment = 5;
string query_fragment = 4;
}

Binary file not shown.

View File

@@ -88,10 +88,7 @@ pub struct ColumnDefinition {
/// s ≤ p and p ≥ 1.
#[prost(string, tag = "2")]
pub field_type: ::prost::alloc::string::String,
/// Once initially stored, this column can never be changed.
#[prost(bool, tag = "3")]
pub immutable: bool,
/// MONEY rounding applied before an immutable value is initially stored.
/// MONEY rounding applied before a value is stored.
#[prost(enumeration = "MoneyRounding", tag = "4")]
pub rounding: i32,
}

View File

@@ -26,8 +26,6 @@ pub struct PostTableScriptRequest {
///
/// * Structured table/column access (enforces link constraints):
/// (steel_get_column "table_name" "column_name")
/// (steel_get_column_with_index "table_name" index "column_name")
/// • index must be a non-negative integer literal
/// • self-references are allowed without links
/// • other tables require an explicit link from the source table
/// (table_definition_links) or the request fails
@@ -48,7 +46,7 @@ pub struct PostTableScriptRequest {
///
/// Dependency tracking and cycles:
///
/// * Dependencies are extracted from steel_get_column(\_with_index), get-var,
/// * Dependencies are extracted from steel_get_column, get-var,
/// and steel_query_sql and stored in script_dependencies with context
/// * Cycles across tables are rejected (self-dependency is allowed)
#[prost(string, tag = "3")]
@@ -56,6 +54,10 @@ 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)]
@@ -101,6 +103,8 @@ pub struct StoredTableScript {
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub dependencies: ::prost::alloc::vec::Vec<ScriptDependency>,
#[prost(bool, tag = "7")]
pub recompute_on_dependency_change: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScriptDependency {
@@ -110,9 +114,7 @@ pub struct ScriptDependency {
pub dependency_type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub column: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub index: i64,
#[prost(string, tag = "5")]
#[prost(string, tag = "4")]
pub query_fragment: ::prost::alloc::string::String,
}
/// Generated client implementations.
@@ -229,7 +231,7 @@ pub mod table_script_client {
/// * Validates math operations: prohibits using certain data types in math
/// * Enforces link constraints for structured table access:
/// • Allowed always: self-references (same table)
/// • Structured access via steel_get_column / steel_get_column_with_index
/// • Structured access via steel_get_column
/// requires an explicit link in table_definition_links
/// • Raw SQL access via steel_query_sql is permitted (still validated)
/// * Detects and rejects circular dependencies across all scripts in the schema
@@ -328,7 +330,7 @@ pub mod table_script_server {
/// * Validates math operations: prohibits using certain data types in math
/// * Enforces link constraints for structured table access:
/// • Allowed always: self-references (same table)
/// • Structured access via steel_get_column / steel_get_column_with_index
/// • Structured access via steel_get_column
/// requires an explicit link in table_definition_links
/// • Raw SQL access via steel_query_sql is permitted (still validated)
/// * Detects and rejects circular dependencies across all scripts in the schema