From 32f435054c1dddab2a2c0b2ed80e0cf59732f154 Mon Sep 17 00:00:00 2001 From: Nikitin Aleksandr Date: Thu, 15 Feb 2024 17:08:42 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20CreateFi?= =?UTF-8?q?lesUpdateEveryColumn()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../grpc/grpc_client/grpc_client_table_update_func_test.go_ | 4 ++-- .../create_files/grpc_client_tables/grpc_client_tables.go | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/templates/pkg/network/grpc/grpc_client/grpc_client_table_update_func_test.go_ b/bin/templates/pkg/network/grpc/grpc_client/grpc_client_table_update_func_test.go_ index eefbe42..d19ea8d 100644 --- a/bin/templates/pkg/network/grpc/grpc_client/grpc_client_table_update_func_test.go_ +++ b/bin/templates/pkg/network/grpc/grpc_client/grpc_client_table_update_func_test.go_ @@ -9,7 +9,7 @@ func TestCrud_GRPC_Update(t *testing.T) { //прочитаем из БД Model := lawsuit_status_types.LawsuitStatusType{} Model.ID = Postgres_ID_Test - err := crud.LawsuitStatusType_Read(&Model) + err := crud.Read(&Model) if err != nil { t.Error("TestCrud_GRPC_Update() Read() error: ", err) @@ -19,7 +19,7 @@ func TestCrud_GRPC_Update(t *testing.T) { Otvet := lawsuit_status_types.LawsuitStatusType{} Otvet.ID = Model.ID Otvet.ColumnName = Model.ColumnName - err = crud.LawsuitStatusType_Update(&Otvet) + err = crud.Update_ColumnName(&Otvet) if err != nil { t.Error("TestCrud_GRPC_Update() Update() error: ", err) } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables.go b/internal/create_files/grpc_client_tables/grpc_client_tables.go index f26babc..3b995c1 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables.go @@ -538,7 +538,7 @@ func CreateTestFilesUpdateEveryColumn(Table1 *types.Table) error { ModelTableURL := create_files.FindModelTableURL(TableName) TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ModelTableURL) - TextGRPC_Client = create_files.ConvertIdToAlias(TextGRPC_Client, Table1) + //TextGRPC_Client = create_files.ConvertIdToAlias(TextGRPC_Client, Table1) //} //создание текста @@ -554,6 +554,9 @@ func CreateTestFilesUpdateEveryColumn(Table1 *types.Table) error { TextGRPC_Client = config.Settings.TEXT_MODULE_GENERATED + TextGRPC_Client + //SkipNow() если нет строк в БД + TextGRPC_Client = create_files.AddSkipNow(TextGRPC_Client, Table1) + //удаление пустого импорта TextGRPC_Client = create_files.DeleteEmptyImport(TextGRPC_Client) TextGRPC_Client = create_files.DeleteEmptyLines(TextGRPC_Client)