This commit is contained in:
filipriec
2025-07-25 11:59:18 +02:00
parent 38a70128b0
commit 9eb46cb5d3
99 changed files with 4465 additions and 224 deletions

View File

@@ -1,7 +1,7 @@
grpcurl -plaintext -d '{
"username": "testuser2",
"email": "test2@example.com"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
{
"id": "5fa9bbce-85e0-4b06-8364-b561770c2fdd",
"username": "testuser2",

View File

@@ -3,7 +3,7 @@
"email": "test3@example.com",
"password": "your_password",
"password_confirmation": "your_password"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
{
"id": "96d2fd35-b39d-4c05-916a-66134453d34c",
"username": "testuser3",
@@ -12,14 +12,14 @@
}
grpcurl -plaintext -d '{
"identifier": "testuser3"
}' localhost:50051 multieko2.auth.AuthService/Login
}' localhost:50051 KompAC.auth.AuthService/Login
ERROR:
Code: Unauthenticated
Message: Invalid credentials
grpcurl -plaintext -d '{
"identifier": "testuser3",
"password": "your_password"
}' localhost:50051 multieko2.auth.AuthService/Login
}' localhost:50051 KompAC.auth.AuthService/Login
{
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI5NmQyZmQzNS1iMzlkLTRjMDUtOTE2YS02NjEzNDQ1M2QzNGMiLCJleHAiOjE3NDI5ODE2MTAsInJvbGUiOiJhY2NvdW50YW50In0.78VIR3X4QZohzeI5x3xmkmqcICTusOC6PELPohMV-k8",
"tokenType": "Bearer",
@@ -30,7 +30,7 @@ ERROR:
grpcurl -plaintext -d '{
"username": "testuser4",
"email": "test4@example.com"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
{
"id": "413d7ecc-f231-48af-8c5a-566b1dc2bf0b",
"username": "testuser4",
@@ -39,7 +39,7 @@ ERROR:
}
grpcurl -plaintext -d '{
"identifier": "test4@example.com"
}' localhost:50051 multieko2.auth.AuthService/Login
}' localhost:50051 KompAC.auth.AuthService/Login
{
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MTNkN2VjYy1mMjMxLTQ4YWYtOGM1YS01NjZiMWRjMmJmMGIiLCJleHAiOjE3NDI5ODE3MDEsInJvbGUiOiJhY2NvdW50YW50In0.4Hzu3tTZRNGHnBSgeCbGy2tFTl8EzpPdXBhcW8kuIc8",
"tokenType": "Bearer",
@@ -47,5 +47,5 @@ ERROR:
"userId": "413d7ecc-f231-48af-8c5a-566b1dc2bf0b",
"role": "accountant"
}
╭─    ~/Doc/pr/multieko2/server    auth ······ ✔
╭─    ~/Doc/pr/KompAC/server    auth ······ ✔
╰─

View File

@@ -3,7 +3,7 @@
"email": "default@example.com",
"password": "password",
"password_confirmation": "password"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
{
"id": "73017288-af41-49d8-b4cb-2ac2109b38a1",
"username": "testuser_default_role",
@@ -16,7 +16,7 @@
"password": "password",
"password_confirmation": "password",
"role": "admin"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
{
"id": "9437e318-818b-4c34-822d-c2d6601b835e",
"username": "testuser_admin_role",
@@ -29,9 +29,9 @@
"password": "password",
"password_confirmation": "password",
"role": "invalid_role_name"
}' localhost:50051 multieko2.auth.AuthService/Register
}' localhost:50051 KompAC.auth.AuthService/Register
ERROR:
Code: InvalidArgument
Message: Invalid role specified: 'invalid_role_name'
╭─    ~/Doc/pr/multieko2/server    main +3 !1 
╭─    ~/Doc/pr/KompAC/server    main +3 !1 
╰─

View File

@@ -3,7 +3,7 @@ use bcrypt::verify;
use tonic::{Response, Status};
use crate::db::PgPool;
use crate::auth::logic::jwt; // Fixed import path
use common::proto::multieko2::auth::{LoginRequest, LoginResponse};
use common::proto::KompAC::auth::{LoginRequest, LoginResponse};
pub async fn login(
pool: &PgPool,

View File

@@ -1,7 +1,7 @@
// src/auth/handlers/register.rs
use bcrypt::{hash, DEFAULT_COST};
use tonic::{Response, Status};
use common::proto::multieko2::auth::{RegisterRequest, AuthResponse};
use common::proto::KompAC::auth::{RegisterRequest, AuthResponse};
use crate::db::PgPool;
use crate::auth::models::AuthError;

View File

@@ -4,7 +4,7 @@ use tonic_reflection::server::Builder as ReflectionBuilder;
use tokio::sync::mpsc;
use crate::indexer::{indexer_task, IndexCommand};
use common::proto::multieko2::FILE_DESCRIPTOR_SET;
use common::proto::KompAC::FILE_DESCRIPTOR_SET;
use crate::server::services::{
TableStructureHandler,
TableDefinitionService,
@@ -12,7 +12,7 @@ use crate::server::services::{
TableScriptService,
AuthServiceImpl
};
use common::proto::multieko2::{
use common::proto::KompAC::{
table_structure::table_structure_service_server::TableStructureServiceServer,
table_definition::table_definition_server::TableDefinitionServer,
tables_data::tables_data_server::TablesDataServer,

View File

@@ -1,6 +1,6 @@
// src/server/services/auth_service.rs
use tonic::{Request, Response, Status};
use common::proto::multieko2::auth::{
use common::proto::KompAC::auth::{
auth_service_server::AuthService,
RegisterRequest, AuthResponse,
LoginRequest, LoginResponse

View File

@@ -1,6 +1,6 @@
// src/server/services/table_definition_service.rs
use tonic::{Request, Response, Status};
use common::proto::multieko2::{
use common::proto::KompAC::{
common::Empty,
table_definition::{
table_definition_server::TableDefinition,

View File

@@ -1,6 +1,6 @@
// src/server/services/table_script_service.rs
use tonic::{Request, Response, Status};
use common::proto::multieko2::table_script::{
use common::proto::KompAC::table_script::{
table_script_server::TableScript,
PostTableScriptRequest, TableScriptResponse
};

View File

@@ -1,8 +1,8 @@
// src/server/services/table_structure_service.rs
use tonic::{Request, Response, Status};
// Correct the import path for the TableStructureService trait
use common::proto::multieko2::table_structure::table_structure_service_server::TableStructureService;
use common::proto::multieko2::table_structure::{
use common::proto::KompAC::table_structure::table_structure_service_server::TableStructureService;
use common::proto::KompAC::table_structure::{
GetTableStructureRequest,
TableStructureResponse,
};

View File

@@ -5,9 +5,9 @@ use tonic::{Request, Response, Status};
use tokio::sync::mpsc;
use crate::indexer::IndexCommand;
use common::proto::multieko2::tables_data::tables_data_server::TablesData;
use common::proto::multieko2::common::CountResponse;
use common::proto::multieko2::tables_data::{
use common::proto::KompAC::tables_data::tables_data_server::TablesData;
use common::proto::KompAC::common::CountResponse;
use common::proto::KompAC::tables_data::{
PostTableDataRequest, PostTableDataResponse,
PutTableDataRequest, PutTableDataResponse,
DeleteTableDataRequest, DeleteTableDataResponse,

View File

@@ -3,7 +3,7 @@
"target_column": "idea_name",
"script": "(begin (define idea_name \"aaa\") idea_name)",
"description": "Set idea_name to Awesome Idea"
}' localhost:50051 multieko2.table_script.TableScript/PostTableScript
}' localhost:50051 KompAC.table_script.TableScript/PostTableScript
{
"id": "7"
}
@@ -17,7 +17,7 @@
"is_feasible": "true",
"last_updated": "2025-03-11T12:34:56Z"
}
}' localhost:50051 multieko2.tables_data.TablesData/PostTableData
}' localhost:50051 KompAC.tables_data.TablesData/PostTableData
ERROR:
Code: InvalidArgument
Message: Validation failed for 'idea_name'. Expected: 'aaa', Received: 'sdfsfs'
@@ -31,7 +31,7 @@ ERROR:
"is_feasible": "true",
"last_updated": "2025-03-11T12:34:56Z"
}
}' localhost:50051 multieko2.tables_data.TablesData/PostTableData
}' localhost:50051 KompAC.tables_data.TablesData/PostTableData
{
"success": true,
"message": "Data inserted successfully",

View File

@@ -6,7 +6,7 @@ Creation of the tables:
{"name": "yearly_goal", "field_type": "text"}
],
"profile_name": "finance"
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
{
"success": true,
"sql": "CREATE TABLE \"2025_department\" (\n id BIGSERIAL PRIMARY KEY,\n deleted BOOLEAN NOT NULL DEFAULT FALSE,\n \"yearly_goal\" TEXT,\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n)\n"
@@ -22,7 +22,7 @@ Creation of the tables:
"links": [
{"linked_table_name": "2025_department", "required": true}
]
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
{
"success": true,
"sql": "CREATE TABLE \"2025_project\" (\n id BIGSERIAL PRIMARY KEY,\n deleted BOOLEAN NOT NULL DEFAULT FALSE,\n \"department_id\" BIGINT NOT NULL REFERENCES \"2025_department\"(id),\n \"name\" TEXT,\n \"budget_estimate\" TEXT,\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n)\nCREATE INDEX idx_2025_project_department_fk ON \"2025_project\" (\"department_id\")\nCREATE INDEX idx_2025_project_name ON \"2025_project\" (\"name\")"

View File

@@ -88,7 +88,6 @@ pub async fn execute_script(
for (key, value) in &context.row_data {
// Register both @ prefixed and bare variable names
define_script.push_str(&format!("(define {} \"{}\")\n", key, value));
define_script.push_str(&format!("(define @{} \"{}\")\n", key, value));
}

View File

@@ -15,7 +15,7 @@
"indexes": ["company_name", "is_active"],
"profile_name": "default",
"linked_table_name": ""
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
ERROR:
Code: NotFound
Message: Linked table not found in profile
@@ -35,12 +35,12 @@ ERROR:
],
"indexes": ["company_name", "is_active"],
"profile_name": "default"
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
{
"success": true,
"sql": "CREATE TABLE \"2025_company_data1\" (\n id BIGSERIAL PRIMARY KEY,\n deleted BOOLEAN NOT NULL DEFAULT FALSE,\n firma TEXT NOT NULL,\n \"company_name\" TEXT,\n \"textfield\" TEXT,\n \"textfield2\" TEXT,\n \"textfield3\" TEXT,\n \"headquarters_psc\" TEXT,\n \"contact_phone\" VARCHAR(15),\n \"office_address\" TEXT,\n \"support_email\" VARCHAR(255),\n \"is_active\" BOOLEAN,\n \"last_updated\" TIMESTAMPTZ,\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n)\nCREATE INDEX idx_2025_company_data1_firma ON \"2025_company_data1\" (firma)\nCREATE INDEX idx_2025_company_data1_company_name ON \"2025_company_data1\" (\"company_name\")\nCREATE INDEX idx_2025_company_data1_is_active ON \"2025_company_data1\" (\"is_active\")"
}
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -56,12 +56,12 @@ ERROR:
grpcurl -plaintext -d '{
"profile_name": "default",
"table_name": "2025_company_data1"
}' localhost:50051 multieko2.table_definition.TableDefinition/DeleteTable
}' localhost:50051 KompAC.table_definition.TableDefinition/DeleteTable
{
"success": true,
"message": "Table '2025_company_data1' and its definition were successfully removed"
}
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{}
╭─    ~/Doc/pr/multieko2/server    main ⇡1 ········· ✔
╭─    ~/Doc/pr/KompAC/server    main ⇡1 ········· ✔
╰─

View File

@@ -1,4 +1,4 @@
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -80,12 +80,12 @@
"indexes": ["column1", "columnd"],
"profile_name": "new_profile",
"linked_table_name": "2025_multi_dependent_table3"
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
{
"success": true,
"sql": "CREATE TABLE \"2025_multi_dependent_table5\" (\n id BIGSERIAL PRIMARY KEY,\n deleted BOOLEAN NOT NULL DEFAULT FALSE,\n firma TEXT NOT NULL,\n \"multi_dependent_table3_id\" BIGINT NOT NULL REFERENCES \"2025_multi_dependent_table3\"(id),\n \"2025_column1\" TEXT,\n \"2025_columnx\" TEXT,\n \"2025_columny\" TEXT,\n \"2025_columnz\" TEXT,\n \"2025_columna\" TEXT,\n \"2025_columnb\" TEXT,\n \"2025_columnc\" TEXT,\n \"2025_columnd\" TEXT,\n \"2025_column2\" INTEGER,\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n)\nCREATE INDEX idx_2025_multi_dependent_table5_firma ON \"2025_multi_dependent_table5\" (firma)\nCREATE INDEX idx_2025_multi_dependent_table5_multi_dependent_table3_id ON \"2025_multi_dependent_table5\" (\"multi_dependent_table3_id\")\nCREATE INDEX idx_2025_multi_dependent_table5_2025_column1 ON \"2025_multi_dependent_table5\" (\"2025_column1\")\nCREATE INDEX idx_2025_multi_dependent_table5_2025_columnd ON \"2025_multi_dependent_table5\" (\"2025_columnd\")"
}
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{

View File

@@ -1,4 +1,4 @@
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -44,12 +44,12 @@
],
"indexes": ["firma", "mesto"],
"profile_name": "default"
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition
{
"success": true,
"sql": "CREATE TABLE \"2025_adresar6\" (\n id BIGSERIAL PRIMARY KEY,\n deleted BOOLEAN NOT NULL DEFAULT FALSE,\n \"firma\" TEXT,\n \"kz\" TEXT,\n \"drc\" TEXT,\n \"ulica\" TEXT,\n \"psc\" TEXT,\n \"mesto\" TEXT,\n \"stat\" TEXT,\n \"banka\" TEXT,\n \"ucet\" TEXT,\n \"skladm\" TEXT,\n \"ico\" TEXT,\n \"kontakt\" TEXT,\n \"telefon\" VARCHAR(15),\n \"skladu\" TEXT,\n \"fax\" TEXT,\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n)\nCREATE INDEX idx_2025_adresar6_firma ON \"2025_adresar6\" (\"firma\")\nCREATE INDEX idx_2025_adresar6_mesto ON \"2025_adresar6\" (\"mesto\")"
}
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -154,4 +154,4 @@ grpcurl -plaintext -d '{
{"linked_table_name": "2025_shipping_provider", "required": false},
{"linked_table_name": "2025_ecom_product", "required": false}
]
}' localhost:50051 multieko2.table_definition.TableDefinition/PostTableDefinition
}' localhost:50051 KompAC.table_definition.TableDefinition/PostTableDefinition

View File

@@ -1,7 +1,7 @@
// src/table_definition/handlers/delete_table.rs
use tonic::Status;
use sqlx::PgPool;
use common::proto::multieko2::table_definition::{DeleteTableRequest, DeleteTableResponse};
use common::proto::KompAC::table_definition::{DeleteTableRequest, DeleteTableResponse};
pub async fn delete_table(
db_pool: &PgPool,

View File

@@ -1,7 +1,7 @@
// src/table_definition/handlers/get_profile_tree.rs
use tonic::{Request, Response, Status};
use sqlx::PgPool;
use common::proto::multieko2::{
use common::proto::KompAC::{
common::Empty,
table_definition::{
ProfileTreeResponse,

View File

@@ -3,7 +3,7 @@
use tonic::Status;
use sqlx::{PgPool, Transaction, Postgres};
use serde_json::json;
use common::proto::multieko2::table_definition::{PostTableDefinitionRequest, TableDefinitionResponse};
use common::proto::KompAC::table_definition::{PostTableDefinitionRequest, TableDefinitionResponse};
const PREDEFINED_FIELD_TYPES: &[(&str, &str)] = &[
("text", "TEXT"),

View File

@@ -4,7 +4,7 @@ This is how we can push script into the database, now its stored after a push in
"target_column": "fax",
"script": "(set! fax telefon)",
"description": "Copy telefon value to fax column"
}' localhost:50051 multieko2.table_script.TableScript/PostTableScript
}' localhost:50051 KompAC.table_script.TableScript/PostTableScript
{
"id": "2"
}

View File

@@ -3,7 +3,7 @@
use tonic::Status;
use sqlx::{PgPool, Error as SqlxError};
use common::proto::multieko2::table_script::{PostTableScriptRequest, TableScriptResponse};
use common::proto::KompAC::table_script::{PostTableScriptRequest, TableScriptResponse};
use serde_json::Value;
use steel_decimal::SteelDecimal;
use regex::Regex;

View File

@@ -4,7 +4,7 @@ grpcurl -plaintext \
"table_name": "2025_customer"
}' \
localhost:50051 \
multieko2.table_structure.TableStructureService/GetTableStructure
KompAC.table_structure.TableStructureService/GetTableStructure
{
"columns": [
{

View File

@@ -1,5 +1,5 @@
// src/table_structure/handlers/table_structure.rs
use common::proto::multieko2::table_structure::{
use common::proto::KompAC::table_structure::{
GetTableStructureRequest, TableColumn, TableStructureResponse,
};
use sqlx::PgPool;

View File

@@ -2,7 +2,7 @@ grpcurl -plaintext -d '{
"profile_name": "default",
"table_name": "2025_adresar",
"position": 1
}' localhost:50051 multieko2.tables_data.TablesData/GetTableDataByPosition
}' localhost:50051 KompAC.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 multieko2.tables_data.TablesData/GetTableData
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 2}' localhost:50051 KompAC.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 multieko2.tables_data.TablesData/GetTableData
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar", "id": 1}' localhost:50051 KompAC.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 multieko2.tables_data.TablesData/GetTableDataCount
grpcurl -plaintext -d '{"profile_name": "default", "table_name": "2025_adresar"}' localhost:50051 KompAC.tables_data.TablesData/GetTableDataCount
{
"count": "1"

View File

@@ -1,4 +1,4 @@
grpcurl -plaintext -d '{}' localhost:50051 multieko2.table_definition.TableDefinition/GetProfileTree
grpcurl -plaintext -d '{}' localhost:50051 KompAC.table_definition.TableDefinition/GetProfileTree
{
"profiles": [
{
@@ -26,7 +26,7 @@
"support_email": "support@acmecorp.com",
"is_active": "true"
}
}' localhost:50051 multieko2.tables_data.TablesData/PostTableData
}' localhost:50051 KompAC.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 multieko2.tables_data.TablesData/PutTableData
}' localhost:50051 KompAC.tables_data.TablesData/PutTableData
{
"success": true,
"message": "Data updated successfully",
@@ -28,7 +28,7 @@
"firma": "1",
"is_active": "true"
}
}' localhost:50051 multieko2.tables_data.TablesData/PutTableData
}' localhost:50051 KompAC.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::multieko2::tables_data::{DeleteTableDataRequest, DeleteTableDataResponse};
use common::proto::KompAC::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::multieko2::tables_data::{GetTableDataRequest, GetTableDataResponse};
use common::proto::KompAC::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::multieko2::tables_data::{
use common::proto::KompAC::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::multieko2::common::CountResponse;
use common::proto::multieko2::tables_data::GetTableDataCountRequest;
use common::proto::KompAC::common::CountResponse;
use common::proto::KompAC::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::multieko2::tables_data::{PostTableDataRequest, PostTableDataResponse};
use common::proto::KompAC::tables_data::{PostTableDataRequest, PostTableDataResponse};
use std::collections::HashMap;
use std::sync::Arc;
use prost_types::value::Kind;

View File

@@ -4,8 +4,8 @@ use tonic::Status;
use sqlx::{PgPool, Arguments, Row};
use sqlx::postgres::PgArguments;
use chrono::{DateTime, Utc};
use common::proto::multieko2::tables_data::{PutTableDataRequest, PutTableDataResponse};
use std::collections::HashMap;
use common::proto::KompAC::tables_data::{PutTableDataRequest, PutTableDataResponse};
use std::sync::Arc;
use prost_types::value::Kind;
use rust_decimal::Decimal;