with index get column dep. removed
This commit is contained in:
@@ -5,7 +5,7 @@ resolver = "3"
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
# TODO: idk how to do the name, fix later
|
# TODO: idk how to do the name, fix later
|
||||||
# name = "komp_ac"
|
# name = "komp_ac"
|
||||||
version = "0.8.18"
|
version = "0.8.23"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
authors = ["Filip Priečinský <filippriec@gmail.com>"]
|
authors = ["Filip Priečinský <filippriec@gmail.com>"]
|
||||||
|
|||||||
2
client
2
client
Submodule client updated: 3eb0effba1...4023272451
@@ -126,10 +126,9 @@ message ColumnDefinition {
|
|||||||
// s ≤ p and p ≥ 1.
|
// s ≤ p and p ≥ 1.
|
||||||
string field_type = 2;
|
string field_type = 2;
|
||||||
|
|
||||||
// Once initially stored, this column can never be changed.
|
reserved 3;
|
||||||
bool immutable = 3;
|
|
||||||
|
|
||||||
// MONEY rounding applied before an immutable value is initially stored.
|
// MONEY rounding applied before a value is stored.
|
||||||
MoneyRounding rounding = 4;
|
MoneyRounding rounding = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ service TableScript {
|
|||||||
// - Validates math operations: prohibits using certain data types in math
|
// - Validates math operations: prohibits using certain data types in math
|
||||||
// - Enforces link constraints for structured table access:
|
// - Enforces link constraints for structured table access:
|
||||||
// • Allowed always: self-references (same table)
|
// • 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
|
// requires an explicit link in table_definition_links
|
||||||
// • Raw SQL access via steel_query_sql is permitted (still validated)
|
// • Raw SQL access via steel_query_sql is permitted (still validated)
|
||||||
// - Detects and rejects circular dependencies across all scripts in the schema
|
// - Detects and rejects circular dependencies across all scripts in the schema
|
||||||
@@ -67,8 +67,6 @@ message PostTableScriptRequest {
|
|||||||
// Referencing data:
|
// Referencing data:
|
||||||
// - Structured table/column access (enforces link constraints):
|
// - Structured table/column access (enforces link constraints):
|
||||||
// (steel_get_column "table_name" "column_name")
|
// (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
|
// • self-references are allowed without links
|
||||||
// • other tables require an explicit link from the source table
|
// • other tables require an explicit link from the source table
|
||||||
// (table_definition_links) or the request fails
|
// (table_definition_links) or the request fails
|
||||||
@@ -87,13 +85,17 @@ message PostTableScriptRequest {
|
|||||||
// BIGINT, TEXT, BOOLEAN, DATE, TIMESTAMPTZ
|
// BIGINT, TEXT, BOOLEAN, DATE, TIMESTAMPTZ
|
||||||
//
|
//
|
||||||
// Dependency tracking and cycles:
|
// 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
|
// and steel_query_sql and stored in script_dependencies with context
|
||||||
// - Cycles across tables are rejected (self-dependency is allowed)
|
// - Cycles across tables are rejected (self-dependency is allowed)
|
||||||
string script = 3;
|
string script = 3;
|
||||||
|
|
||||||
// Optional. Free-text description stored alongside the script (no functional effect).
|
// Optional. Free-text description stored alongside the script (no functional effect).
|
||||||
string description = 4;
|
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.
|
// Response after creating or updating a script.
|
||||||
@@ -128,12 +130,12 @@ message StoredTableScript {
|
|||||||
string script = 4;
|
string script = 4;
|
||||||
string description = 5;
|
string description = 5;
|
||||||
repeated ScriptDependency dependencies = 6;
|
repeated ScriptDependency dependencies = 6;
|
||||||
|
bool recompute_on_dependency_change = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ScriptDependency {
|
message ScriptDependency {
|
||||||
string target_table = 1;
|
string target_table = 1;
|
||||||
string dependency_type = 2;
|
string dependency_type = 2;
|
||||||
string column = 3;
|
string column = 3;
|
||||||
int64 index = 4;
|
string query_fragment = 4;
|
||||||
string query_fragment = 5;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -88,10 +88,7 @@ pub struct ColumnDefinition {
|
|||||||
/// s ≤ p and p ≥ 1.
|
/// s ≤ p and p ≥ 1.
|
||||||
#[prost(string, tag = "2")]
|
#[prost(string, tag = "2")]
|
||||||
pub field_type: ::prost::alloc::string::String,
|
pub field_type: ::prost::alloc::string::String,
|
||||||
/// Once initially stored, this column can never be changed.
|
/// MONEY rounding applied before a value is stored.
|
||||||
#[prost(bool, tag = "3")]
|
|
||||||
pub immutable: bool,
|
|
||||||
/// MONEY rounding applied before an immutable value is initially stored.
|
|
||||||
#[prost(enumeration = "MoneyRounding", tag = "4")]
|
#[prost(enumeration = "MoneyRounding", tag = "4")]
|
||||||
pub rounding: i32,
|
pub rounding: i32,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ pub struct PostTableScriptRequest {
|
|||||||
///
|
///
|
||||||
/// * Structured table/column access (enforces link constraints):
|
/// * Structured table/column access (enforces link constraints):
|
||||||
/// (steel_get_column "table_name" "column_name")
|
/// (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
|
/// • self-references are allowed without links
|
||||||
/// • other tables require an explicit link from the source table
|
/// • other tables require an explicit link from the source table
|
||||||
/// (table_definition_links) or the request fails
|
/// (table_definition_links) or the request fails
|
||||||
@@ -48,7 +46,7 @@ pub struct PostTableScriptRequest {
|
|||||||
///
|
///
|
||||||
/// Dependency tracking and cycles:
|
/// 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
|
/// and steel_query_sql and stored in script_dependencies with context
|
||||||
/// * Cycles across tables are rejected (self-dependency is allowed)
|
/// * Cycles across tables are rejected (self-dependency is allowed)
|
||||||
#[prost(string, tag = "3")]
|
#[prost(string, tag = "3")]
|
||||||
@@ -56,6 +54,10 @@ pub struct PostTableScriptRequest {
|
|||||||
/// Optional. Free-text description stored alongside the script (no functional effect).
|
/// Optional. Free-text description stored alongside the script (no functional effect).
|
||||||
#[prost(string, tag = "4")]
|
#[prost(string, tag = "4")]
|
||||||
pub description: ::prost::alloc::string::String,
|
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.
|
/// Response after creating or updating a script.
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
@@ -101,6 +103,8 @@ pub struct StoredTableScript {
|
|||||||
pub description: ::prost::alloc::string::String,
|
pub description: ::prost::alloc::string::String,
|
||||||
#[prost(message, repeated, tag = "6")]
|
#[prost(message, repeated, tag = "6")]
|
||||||
pub dependencies: ::prost::alloc::vec::Vec<ScriptDependency>,
|
pub dependencies: ::prost::alloc::vec::Vec<ScriptDependency>,
|
||||||
|
#[prost(bool, tag = "7")]
|
||||||
|
pub recompute_on_dependency_change: bool,
|
||||||
}
|
}
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||||
pub struct ScriptDependency {
|
pub struct ScriptDependency {
|
||||||
@@ -110,9 +114,7 @@ pub struct ScriptDependency {
|
|||||||
pub dependency_type: ::prost::alloc::string::String,
|
pub dependency_type: ::prost::alloc::string::String,
|
||||||
#[prost(string, tag = "3")]
|
#[prost(string, tag = "3")]
|
||||||
pub column: ::prost::alloc::string::String,
|
pub column: ::prost::alloc::string::String,
|
||||||
#[prost(int64, tag = "4")]
|
#[prost(string, tag = "4")]
|
||||||
pub index: i64,
|
|
||||||
#[prost(string, tag = "5")]
|
|
||||||
pub query_fragment: ::prost::alloc::string::String,
|
pub query_fragment: ::prost::alloc::string::String,
|
||||||
}
|
}
|
||||||
/// Generated client implementations.
|
/// Generated client implementations.
|
||||||
@@ -229,7 +231,7 @@ pub mod table_script_client {
|
|||||||
/// * Validates math operations: prohibits using certain data types in math
|
/// * Validates math operations: prohibits using certain data types in math
|
||||||
/// * Enforces link constraints for structured table access:
|
/// * Enforces link constraints for structured table access:
|
||||||
/// • Allowed always: self-references (same table)
|
/// • 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
|
/// requires an explicit link in table_definition_links
|
||||||
/// • Raw SQL access via steel_query_sql is permitted (still validated)
|
/// • Raw SQL access via steel_query_sql is permitted (still validated)
|
||||||
/// * Detects and rejects circular dependencies across all scripts in the schema
|
/// * 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
|
/// * Validates math operations: prohibits using certain data types in math
|
||||||
/// * Enforces link constraints for structured table access:
|
/// * Enforces link constraints for structured table access:
|
||||||
/// • Allowed always: self-references (same table)
|
/// • 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
|
/// requires an explicit link in table_definition_links
|
||||||
/// • Raw SQL access via steel_query_sql is permitted (still validated)
|
/// • Raw SQL access via steel_query_sql is permitted (still validated)
|
||||||
/// * Detects and rejects circular dependencies across all scripts in the schema
|
/// * Detects and rejects circular dependencies across all scripts in the schema
|
||||||
|
|||||||
2
server
2
server
Submodule server updated: 75ad74a9d8...e8267235bc
Reference in New Issue
Block a user