optimization on the client steel scripts3 - removing datafusion from the steel dependencies

This commit is contained in:
Priec
2026-07-18 00:07:32 +02:00
parent d5bce6378a
commit 28da618ca7
10 changed files with 663 additions and 12 deletions

View File

@@ -63,9 +63,9 @@ service TableScript {
//
// The server derives the required inputs from stored script_dependencies;
// callers do not choose arbitrary tables or columns. Direct related-column
// reads are grouped by related row, while related aggregates are evaluated
// through the analytics runtime. Returned values include logical type and
// currency metadata so the client can create correctly typed ScriptValues.
// reads and related aggregates are evaluated through SQLx in one read-only
// PostgreSQL snapshot. Returned values include logical type and currency
// metadata so the client can create correctly typed ScriptValues.
//
// Current-table column values are intentionally not returned. The client
// supplies those directly from row_data so unsaved edits participate in
@@ -185,6 +185,14 @@ message ScriptDependency {
string operation = 5;
// Relationship table used to match the owner row to the related collection.
string via_table = 6;
// Source currency for an fx_conversion dependency.
string from_currency = 7;
// Target currency for an fx_conversion dependency.
string to_currency = 8;
// Persisted exchange-rate provider/source identifier.
string source = 9;
// Requested YYYY-MM-DD date, or empty for the latest stored snapshot.
string as_of_date = 10;
}
// Identifies the active form row whose external Steel inputs must be hydrated.
@@ -243,4 +251,18 @@ message HydrateScriptDependenciesResponse {
repeated HydratedColumnValue columns = 1;
// Exact related aggregate inputs declared by stored scripts.
repeated HydratedAggregateValue aggregates = 2;
// Exact resolved rates declared by the table's stored scripts.
repeated HydratedFxRate fx_rates = 3;
}
message HydratedFxRate {
string from_currency = 1;
string to_currency = 2;
string source = 3;
string requested_as_of_date = 4;
string rate = 5;
string effective_date = 6;
int64 rate_set_id = 7;
int32 revision = 8;
string base_currency = 9;
}