renamed again and fixed some minor stuff

This commit is contained in:
filipriec
2025-07-25 18:18:00 +02:00
parent 7437908baf
commit 8127c7bb1b
98 changed files with 306 additions and 296 deletions

View File

@@ -2,7 +2,7 @@ grpcurl -plaintext -d '{
"profile_name": "default",
"table_name": "2025_adresar",
"position": 1
}' localhost:50051 KompAC.tables_data.TablesData/GetTableDataByPosition
}' localhost:50051 komp_ac.tables_data.TablesData/GetTableDataByPosition
{
"data": {
"banka": "New Banka",

View File

@@ -1,6 +1,6 @@
Valid get request:
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 2}' localhost:50051 KompAC.tables_data.TablesData/GetTableData
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 2}' localhost:50051 komp_ac.tables_data.TablesData/GetTableData
{
"data": {
@@ -26,7 +26,7 @@ grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar",
Request of a deleted data:
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 1}' localhost:50051 KompAC.tables_data.TablesData/GetTableData
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 1}' localhost:50051 komp_ac.tables_data.TablesData/GetTableData
ERROR:
Code: NotFound

View File

@@ -1,4 +1,4 @@
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar"}' localhost:50051 KompAC.tables_data.TablesData/GetTableDataCount
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar"}' localhost:50051 komp_ac.tables_data.TablesData/GetTableDataCount
{
"count": "1"

View File

@@ -1,4 +1,4 @@
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 komp_ac.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -26,7 +26,7 @@
"support_email": "support@acmecorp.com",
"is_active": "true"
}
}' localhost:50051 KompAC.tables_data.TablesData/PostTableData
}' localhost:50051 komp_ac.tables_data.TablesData/PostTableData
{
"success": true,
"message": "Data inserted successfully",

View File

@@ -14,7 +14,7 @@
"support_email": "updated-support@acmecorp.com",
"is_active": "false"
}
}' localhost:50051 KompAC.tables_data.TablesData/PutTableData
}' localhost:50051 komp_ac.tables_data.TablesData/PutTableData
{
"success": true,
"message": "Data updated successfully",
@@ -28,7 +28,7 @@
"firma": "1",
"is_active": "true"
}
}' localhost:50051 KompAC.tables_data.TablesData/PutTableData
}' localhost:50051 komp_ac.tables_data.TablesData/PutTableData
{
"success": true,
"message": "Data updated successfully",

View File

@@ -1,7 +1,7 @@
// src/tables_data/handlers/delete_table_data.rs
use tonic::Status;
use sqlx::PgPool;
use common::proto::KompAC::tables_data::{DeleteTableDataRequest, DeleteTableDataResponse};
use common::proto::komp_ac::tables_data::{DeleteTableDataRequest, DeleteTableDataResponse};
use crate::shared::schema_qualifier::qualify_table_name_for_data; // Import schema qualifier
pub async fn delete_table_data(

View File

@@ -3,7 +3,7 @@
use tonic::Status;
use sqlx::{PgPool, Row};
use std::collections::HashMap;
use common::proto::KompAC::tables_data::{GetTableDataRequest, GetTableDataResponse};
use common::proto::komp_ac::tables_data::{GetTableDataRequest, GetTableDataResponse};
use crate::shared::schema_qualifier::qualify_table_name_for_data;
pub async fn get_table_data(

View File

@@ -1,7 +1,7 @@
// src/tables_data/handlers/get_table_data_by_position.rs
use tonic::Status;
use sqlx::PgPool;
use common::proto::KompAC::tables_data::{
use common::proto::komp_ac::tables_data::{
GetTableDataByPositionRequest, GetTableDataRequest, GetTableDataResponse
};
use super::get_table_data;

View File

@@ -1,8 +1,8 @@
// src/tables_data/handlers/get_table_data_count.rs
use tonic::Status;
use sqlx::PgPool;
use common::proto::KompAC::common::CountResponse;
use common::proto::KompAC::tables_data::GetTableDataCountRequest;
use common::proto::komp_ac::common::CountResponse;
use common::proto::komp_ac::tables_data::GetTableDataCountRequest;
use crate::shared::schema_qualifier::qualify_table_name_for_data; // 1. IMPORT THE FUNCTION
pub async fn get_table_data_count(

View File

@@ -4,7 +4,7 @@ use tonic::Status;
use sqlx::{PgPool, Arguments};
use sqlx::postgres::PgArguments;
use chrono::{DateTime, Utc};
use common::proto::KompAC::tables_data::{PostTableDataRequest, PostTableDataResponse};
use common::proto::komp_ac::tables_data::{PostTableDataRequest, PostTableDataResponse};
use std::collections::HashMap;
use std::sync::Arc;
use prost_types::value::Kind;

View File

@@ -4,12 +4,13 @@ use tonic::Status;
use sqlx::{PgPool, Arguments, Row};
use sqlx::postgres::PgArguments;
use chrono::{DateTime, Utc};
use common::proto::KompAC::tables_data::{PutTableDataRequest, PutTableDataResponse};
use common::proto::komp_ac::tables_data::{PutTableDataRequest, PutTableDataResponse};
use std::sync::Arc;
use prost_types::value::Kind;
use rust_decimal::Decimal;
use std::str::FromStr;
use std::collections::HashMap;
use crate::steel::server::execution::{self, Value};
use crate::indexer::{IndexCommand, IndexCommandData};