You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
Main build (Jenkins)
This commit is contained in:
12
docs/en/examples/MySQL/CreateConnection.txt
vendored
12
docs/en/examples/MySQL/CreateConnection.txt
vendored
@@ -7,3 +7,15 @@
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// With TLS
|
||||
|
||||
Address = "api.athenaeum.digital";
|
||||
Port = "3307";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password, Port);
|
||||
TLSSettings = OPI_MySQL.GetTlsSettings(False);
|
||||
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
2
docs/en/examples/MySQL/ExecuteSQLQuery.txt
vendored
2
docs/en/examples/MySQL/ExecuteSQLQuery.txt
vendored
@@ -21,7 +21,7 @@
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
@@ -40,6 +40,18 @@ import TabItem from '@theme/TabItem';
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// With TLS
|
||||
|
||||
Address = "api.athenaeum.digital";
|
||||
Port = "3307";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password, Port);
|
||||
TLSSettings = OPI_MySQL.GetTlsSettings(False);
|
||||
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ Without specifying the `ForcifyResult` flag, result data is returned only for qu
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Результат = OPI_MySQL.ВыполнитьЗапросSQL(ТекстЗапроса, , , Соединение);
|
||||
|
||||
12
docs/ru/examples/MySQL/ОткрытьСоединение.txt
vendored
12
docs/ru/examples/MySQL/ОткрытьСоединение.txt
vendored
@@ -7,3 +7,15 @@
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
// С TLS
|
||||
|
||||
Адрес = "api.athenaeum.digital";
|
||||
Порт = "3307";
|
||||
|
||||
СтрокаПодключения = OPI_MySQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль, Порт);
|
||||
НастройкиTLS = OPI_MySQL.ПолучитьНастройкиTls(Ложь);
|
||||
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения, НастройкиTLS);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
@@ -40,6 +40,18 @@ import TabItem from '@theme/TabItem';
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
// С TLS
|
||||
|
||||
Адрес = "api.athenaeum.digital";
|
||||
Порт = "3307";
|
||||
|
||||
СтрокаПодключения = OPI_MySQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль, Порт);
|
||||
НастройкиTLS = OPI_MySQL.ПолучитьНастройкиTls(Ложь);
|
||||
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения, НастройкиTLS);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ import TabItem from '@theme/TabItem';
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Результат = OPI_MySQL.ВыполнитьЗапросSQL(ТекстЗапроса, , , Соединение);
|
||||
|
||||
13840
service/dictionaries/en.json
vendored
13840
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
6
src/en/OInt/core/Modules/OPI_MySQL.os
vendored
6
src/en/OInt/core/Modules/OPI_MySQL.os
vendored
@@ -68,6 +68,12 @@ Function CreateConnection(Val ConnectionString = "", Val Tls = "") Export
|
||||
|
||||
Connector = OPI_AddIns.GetAddIn("MySQL");
|
||||
|
||||
Tls = OPI_AddIns.SetTls(Connector, Tls);
|
||||
|
||||
If Not OPI_Tools.GetOr(Tls, "result", False) Then
|
||||
Return Tls;
|
||||
EndIf;
|
||||
|
||||
Connector.ConnectionString = ConnectionString;
|
||||
|
||||
Result = Connector.Connect();
|
||||
|
||||
3
src/en/OInt/core/Modules/OPI_TCP.os
vendored
3
src/en/OInt/core/Modules/OPI_TCP.os
vendored
@@ -251,7 +251,8 @@ Function ProcessRequest(Val Address, Val Data = "", Val ResponseString = True, V
|
||||
|
||||
Response = GetLastError(Connection);
|
||||
Response = ?(ValueIsFilled(Response), OPI_Tools.JSONString(Response), "OPI: Failed to send message");
|
||||
Response = ?(ResponseString , Response , ПолучитьДвоичныеДанныеИзСтроки(Response));
|
||||
|
||||
Response = ?(ResponseString, Response, ПолучитьДвоичныеДанныеИзСтроки(Response));
|
||||
|
||||
EndIf;
|
||||
|
||||
|
||||
19
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
19
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
@@ -18511,11 +18511,26 @@ Procedure MySQL_CreateConnection(FunctionParameters)
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection", "MySQL"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_AddIn(Result, "AddIn.OPI_MySQL.Main"); // SKIP
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// With TLS
|
||||
|
||||
Address = "api.athenaeum.digital";
|
||||
Port = "3307";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password, Port);
|
||||
TLSSettings = OPI_MySQL.GetTlsSettings(False);
|
||||
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection", "MySQL");
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection (TLS)", "MySQL");
|
||||
OPI_TestDataRetrieval.Check_AddIn(Result, "AddIn.OPI_MySQL.Main");
|
||||
|
||||
EndProcedure
|
||||
@@ -18592,7 +18607,7 @@ Procedure MySQL_ExecuteSQLQuery(FunctionParameters)
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
@@ -68,6 +68,12 @@ Function CreateConnection(Val ConnectionString = "", Val Tls = "") Export
|
||||
|
||||
Connector = OPI_AddIns.GetAddIn("MySQL");
|
||||
|
||||
Tls = OPI_AddIns.SetTls(Connector, Tls);
|
||||
|
||||
If Not OPI_Tools.GetOr(Tls, "result", False) Then
|
||||
Return Tls;
|
||||
EndIf;
|
||||
|
||||
Connector.ConnectionString = ConnectionString;
|
||||
|
||||
Result = Connector.Connect();
|
||||
|
||||
@@ -251,7 +251,8 @@ Function ProcessRequest(Val Address, Val Data = "", Val ResponseString = True, V
|
||||
|
||||
Response = GetLastError(Connection);
|
||||
Response = ?(ValueIsFilled(Response), OPI_Tools.JSONString(Response), "OPI: Failed to send message");
|
||||
Response = ?(ResponseString , Response , GetBinaryDataFromString(Response));
|
||||
|
||||
Response = ?(ResponseString, Response, GetBinaryDataFromString(Response));
|
||||
|
||||
EndIf;
|
||||
|
||||
|
||||
@@ -18511,11 +18511,26 @@ Procedure MySQL_CreateConnection(FunctionParameters)
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection", "MySQL"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_AddIn(Result, "AddIn.OPI_MySQL.Main"); // SKIP
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// With TLS
|
||||
|
||||
Address = "api.athenaeum.digital";
|
||||
Port = "3307";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password, Port);
|
||||
TLSSettings = OPI_MySQL.GetTlsSettings(False);
|
||||
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString, TLSSettings);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection", "MySQL");
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateConnection (TLS)", "MySQL");
|
||||
OPI_TestDataRetrieval.Check_AddIn(Result, "AddIn.OPI_MySQL.Main");
|
||||
|
||||
EndProcedure
|
||||
@@ -18592,7 +18607,7 @@ Procedure MySQL_ExecuteSQLQuery(FunctionParameters)
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
6
src/ru/OInt/core/Modules/OPI_MySQL.os
vendored
6
src/ru/OInt/core/Modules/OPI_MySQL.os
vendored
@@ -68,6 +68,12 @@
|
||||
|
||||
Коннектор = OPI_Компоненты.ПолучитьКомпоненту("MySQL");
|
||||
|
||||
Tls = OPI_Компоненты.УстановитьTls(Коннектор, Tls);
|
||||
|
||||
Если Не OPI_Инструменты.ПолучитьИли(Tls, "result", Ложь) Тогда
|
||||
Возврат Tls;
|
||||
КонецЕсли;
|
||||
|
||||
Коннектор.ConnectionString = СтрокаПодключения;
|
||||
|
||||
Результат = Коннектор.Connect();
|
||||
|
||||
3
src/ru/OInt/core/Modules/OPI_TCP.os
vendored
3
src/ru/OInt/core/Modules/OPI_TCP.os
vendored
@@ -251,7 +251,8 @@
|
||||
|
||||
Ответ = ПолучитьПоследнююОшибку(Соединение);
|
||||
Ответ = ?(ЗначениеЗаполнено(Ответ), OPI_Инструменты.JSONСтрокой(Ответ), "OPI: Не удалось отправить сообщение");
|
||||
Ответ = ?(ОтветСтрокой , Ответ , ПолучитьДвоичныеДанныеИзСтроки(Ответ));
|
||||
|
||||
Ответ = ?(ОтветСтрокой, Ответ, ПолучитьДвоичныеДанныеИзСтроки(Ответ));
|
||||
|
||||
КонецЕсли;
|
||||
|
||||
|
||||
19
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
19
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
@@ -18511,11 +18511,26 @@
|
||||
СтрокаПодключения = OPI_MySQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОткрытьСоединение", "MySQL"); // SKIP
|
||||
OPI_ПолучениеДанныхТестов.Проверка_Компонента(Результат, "AddIn.OPI_MySQL.Main"); // SKIP
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
// С TLS
|
||||
|
||||
Адрес = "api.athenaeum.digital";
|
||||
Порт = "3307";
|
||||
|
||||
СтрокаПодключения = OPI_MySQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль, Порт);
|
||||
НастройкиTLS = OPI_MySQL.ПолучитьНастройкиTls(Ложь);
|
||||
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения, НастройкиTLS);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОткрытьСоединение", "MySQL");
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОткрытьСоединение (TLS)", "MySQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_Компонента(Результат, "AddIn.OPI_MySQL.Main");
|
||||
|
||||
КонецПроцедуры
|
||||
@@ -18592,7 +18607,7 @@
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|data MEDIUMBLOB
|
||||
|);";
|
||||
|
||||
Результат = OPI_MySQL.ВыполнитьЗапросSQL(ТекстЗапроса, , , Соединение);
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
OPI_Инструменты.ВернутьУправляющиеПоследовательности(СтрокаПодключения);
|
||||
|
||||
Коннектор = OPI_Компоненты.ПолучитьКомпоненту("MySQL");
|
||||
|
||||
|
||||
Tls = OPI_Компоненты.УстановитьTls(Коннектор, Tls);
|
||||
|
||||
Если Не OPI_Инструменты.ПолучитьИли(Tls, "result", Ложь) Тогда
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
Ответ = ПолучитьПоследнююОшибку(Соединение);
|
||||
Ответ = ?(ЗначениеЗаполнено(Ответ), OPI_Инструменты.JSONСтрокой(Ответ), "OPI: Не удалось отправить сообщение");
|
||||
|
||||
|
||||
Ответ = ?(ОтветСтрокой, Ответ, ПолучитьДвоичныеДанныеИзСтроки(Ответ));
|
||||
|
||||
КонецЕсли;
|
||||
|
||||
@@ -18510,7 +18510,7 @@
|
||||
|
||||
СтрокаПодключения = OPI_MySQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения);
|
||||
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОткрытьСоединение", "MySQL"); // SKIP
|
||||
OPI_ПолучениеДанныхТестов.Проверка_Компонента(Результат, "AddIn.OPI_MySQL.Main"); // SKIP
|
||||
|
||||
@@ -18527,7 +18527,7 @@
|
||||
Результат = OPI_MySQL.ОткрытьСоединение(СтрокаПодключения, НастройкиTLS);
|
||||
|
||||
OPI_MySQL.ЗакрытьСоединение(Результат);
|
||||
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОткрытьСоединение (TLS)", "MySQL");
|
||||
|
||||
Reference in New Issue
Block a user