1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot)
2025-06-29 14:35:33 +03:00
parent d7083bc4bc
commit 408473f4ec
2922 changed files with 17295 additions and 16645 deletions

View File

@@ -32,7 +32,16 @@ import TabItem from '@theme/TabItem';
```bsl title="1C:Enterprise/OneScript code example"
Address = "127.0.0.1";
Login = "SA";
Password = "12we...";
Port = 1434;
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
TLSSettings = OPI_MSSQL.GetTlsSettings(True);
Connection = OPI_MSSQL.CreateConnection(ConnectionString, TLSSettings);
Result = OPI_MSSQL.CloseConnection(Connection);
```

View File

@@ -33,26 +33,15 @@ import TabItem from '@theme/TabItem';
```bsl title="1C:Enterprise/OneScript code example"
Address = FunctionParameters["PG_IP"];
Login = "bayselonarrend";
Password = FunctionParameters["PG_Password"];
Address = "127.0.0.1";
Login = "SA";
Password = "12we...";
Port = 1434;
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
Result = OPI_MSSQL.CreateConnection(ConnectionString);
OPI_MSSQL.CloseConnection(Result);
// With TLS
Address = FunctionParameters["PG_IP"];
Port = "1434";
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password, Port);
TLSSettings = OPI_MSSQL.GetTlsSettings(True);
Result = OPI_MSSQL.CreateConnection(ConnectionString, TLSSettings);
OPI_MSSQL.CloseConnection(Result);
```

View File

@@ -37,7 +37,65 @@ Without specifying the `ForcifyResult` flag, result data is returned only for qu
```bsl title="1C:Enterprise/OneScript code example"
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
Address = "127.0.0.1";
Login = "SA";
Password = "12we...";
Base = "test_data";
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, Base, Login, Password);
Connection = OPI_MSSQL.CreateConnection(ConnectionString);
// CREATE
QueryText = "
|CREATE TABLE test_table (
|id INT AUTO_INCREMENT PRIMARY KEY,
|name VARCHAR(255),
|age INT,
|salary DOUBLE,
|amount FLOAT,
|type TINYINT UNSIGNED,
|date DATE,
|time TIME,
|data MEDIUMBLOB
|);";
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, , , Connection);
// INSERT with parameters
QueryText = "
|INSERT INTO test_table (name, age, salary, amount, type, date, time, data)
|VALUES (?, ?, ?, ?, ?, ?, ?, ?);";
ParameterArray = New Array;
ParameterArray.Add(New Structure("TEXT" , "Vitaly"));
ParameterArray.Add(New Structure("INT" , 25));
ParameterArray.Add(New Structure("DOUBLE", 1000.12));
ParameterArray.Add(New Structure("FLOAT" , 1000.12));
ParameterArray.Add(New Structure("UINT" , 1));
ParameterArray.Add(New Structure("DATE" , OPI_Tools.GetCurrentDate()));
ParameterArray.Add(New Structure("TIME" , OPI_Tools.GetCurrentDate()));
ParameterArray.Add(New Structure("BYTES" , Image));
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, ParameterArray, , Connection);
// SELECT (The result of this query is shown in the Result block)
QueryText = "SELECT name, age, salary, amount, type, date, time, data FROM test_table;";
Result = OPI_MSSQL.ExecuteSQLQuery(QueryText, , , Connection);
// SQL query from file
SQLFile = "https://hut.openintegrations.dev/test_data/TEST_DATA2.sql"; // Binary Data, URL or path to file
Result = OPI_MSSQL.ExecuteSQLQuery(SQLFile, , , Connection);
Closing = OPI_MSSQL.CloseConnection(Connection);
```

View File

@@ -36,9 +36,9 @@ This function allows you to quickly assemble a basic connection string. In case
```bsl title="1C:Enterprise/OneScript code example"
Address = FunctionParameters["PG_IP"];
Address = "127.0.0.1";
Login = "bayselonarrend";
Password = FunctionParameters["PG_Password"];
Password = "12we...";
Base = "";
Result = OPI_MSSQL.GenerateConnectionString(Address, Base, Login, Password);

View File

@@ -36,7 +36,7 @@ Tls settings can also be passed in the connection string
```bsl title="1C:Enterprise/OneScript code example"
Result = OPI_MSSQL.GetTlsSettings(True);
```

View File

@@ -32,7 +32,16 @@ import TabItem from '@theme/TabItem';
```bsl title="1C:Enterprise/OneScript code example"
Address = "127.0.0.1";
Login = "SA";
Password = "12we...";
ConnectionString = OPI_MSSQL.GenerateConnectionString(Address, , Login, Password);
Connection = OPI_MSSQL.CreateConnection(ConnectionString);
Result = OPI_MSSQL.IsConnector(Connection);
OPI_MSSQL.CloseConnection(Result);
```