data in accounts is automatic now

This commit is contained in:
Priec
2026-07-29 17:14:13 +02:00
parent f7121e6cf1
commit a5992379db
9 changed files with 20 additions and 13 deletions

Binary file not shown.

View File

@@ -149,9 +149,8 @@ pub struct ColumnDefinition {
/// PHONE (international or national phone number; generates extension/type/country/calling-code companions)
/// TIME (timezone-free time of day)
/// MONEY (= unconstrained NUMERIC; currency comes from the table)
/// ACCOUNTING (creates schema-managed name, debit, and credit columns;
/// automatically creates a required accounts_id link and posts
/// the referenced canonical account row's account value;
/// ACCOUNTING (creates schema-managed name, account, debit, and credit fields;
/// account always selects a row from the profile's managed accounts table;
/// name is limited to 10 characters and one stored row contributes
/// one line to the profile journal)
/// INT

View File

@@ -26,7 +26,8 @@ pub struct GetTableStructureResponse {
pub struct TableStructureResponse {
/// Columns of the physical table, including system columns (id, deleted,
/// created_at, row_revision), user-defined columns, and any foreign-key columns such as
/// "\<linked_table>\_id". May be empty if the physical table is missing.
/// "\<linked_table>\_id", plus the dedicated "account_id" column on
/// ACCOUNTING-enabled tables. May be empty if the physical table is missing.
#[prost(message, repeated, tag = "1")]
pub columns: ::prost::alloc::vec::Vec<TableColumn>,
}

View File

@@ -18,6 +18,7 @@ pub struct PostTableDataRequest {
/// * System/FK columns:
/// • "deleted" (BOOLEAN), optional; default FALSE if not provided
/// • "\<linked_table>\_id" (BIGINT) for each table link
/// • "account_id" (BIGINT) on ACCOUNTING-enabled tables
///
/// Type expectations by SQL type:
///
@@ -208,6 +209,7 @@ pub struct GetTableDataResponse {
/// * id, deleted
/// * all user-defined columns from the table definition
/// * FK columns named "\<linked_table>\_id" for each table link
/// * account_id for ACCOUNTING-enabled tables
///
/// All values are returned as TEXT via col::TEXT and COALESCEed to empty string
/// (NULL becomes ""). The row is returned only if deleted = FALSE.
@@ -498,7 +500,8 @@ pub mod tables_data_client {
/// * Validates profile and table definition
/// * Returns all columns as strings (COALESCE(col::TEXT, '') AS col)
/// including: id, deleted, row_revision, all user-defined columns, and FK columns
/// named "\<linked_table>\_id" for each table link
/// named "\<linked_table>\_id" for each table link, plus "account_id" on
/// ACCOUNTING-enabled tables
/// * Fails with NOT_FOUND if record does not exist or is soft-deleted
/// * If the physical table is missing but the definition exists, returns INTERNAL
pub async fn get_table_data(
@@ -690,7 +693,8 @@ pub mod tables_data_server {
/// * Validates profile and table definition
/// * Returns all columns as strings (COALESCE(col::TEXT, '') AS col)
/// including: id, deleted, row_revision, all user-defined columns, and FK columns
/// named "\<linked_table>\_id" for each table link
/// named "\<linked_table>\_id" for each table link, plus "account_id" on
/// ACCOUNTING-enabled tables
/// * Fails with NOT_FOUND if record does not exist or is soft-deleted
/// * If the physical table is missing but the definition exists, returns INTERNAL
async fn get_table_data(