1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-06 21:04:14 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot)
2025-02-14 23:21:49 +03:00
parent f978ac1274
commit a7e68ba04e
46 changed files with 7282 additions and 6696 deletions
@@ -0,0 +1,4 @@
{
"Address": "93.125.42.204",
"Password": "12we..."
}
+4
View File
@@ -0,0 +1,4 @@
{
"Address": "93.125.42.204",
"Password": "12we..."
}
+4
View File
@@ -3,6 +3,10 @@
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
@@ -0,0 +1,12 @@
Address = "93.125.42.204";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Result = OPI_PostgreSQL.DisableAllDatabaseConnections(Base, ConnectionString);
@@ -0,0 +1 @@
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre();
+31
View File
@@ -0,0 +1,31 @@
Address = "93.125.42.204";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
FieldsStructure = New Structure;
FieldsStructure.Insert("bool_field" , New Structure("BOOL" , False));
FieldsStructure.Insert("oldchar_field" , New Structure("OLDCHAR" , 2));
FieldsStructure.Insert("smallint_field" , New Structure("SMALLINT" , 10));
FieldsStructure.Insert("smallserial_field", New Structure("SMALLSERIAL" , 10));
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "oid_field");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", New Structure("OID", 24576));
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
+5 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 8
---
import Tabs from '@theme/Tabs';
@@ -37,6 +37,10 @@ Binary data can also be transferred as a structure `{'blob':File path}`
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 11
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 7
---
import Tabs from '@theme/Tabs';
@@ -0,0 +1,46 @@
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Disable all database connections
Terminates all connections to the database except the current one
`Function DisableAllDatabaseConnections(Val Base, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Base | --base | String | ✔ | Database name |
| Connection | --dbc | String, Arbitrary | ✖ | Connection or connection string |
Returns: Structure Of KeyAndValue - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Address = "93.125.42.204";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Result = OPI_PostgreSQL.DisableAllDatabaseConnections(Base, ConnectionString);
```
+2 -2
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 12
---
import Tabs from '@theme/Tabs';
@@ -31,7 +31,7 @@ In such a case, you must use `raw:true` to set the condition directly in the que
```bsl title="1C:Enterprise/OneScript code example"
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre();
```
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 9
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
+31 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 10
---
import Tabs from '@theme/Tabs';
@@ -28,7 +28,37 @@ import TabItem from '@theme/TabItem';
```bsl title="1C:Enterprise/OneScript code example"
Address = "93.125.42.204";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
FieldsStructure = New Structure;
FieldsStructure.Insert("bool_field" , New Structure("BOOL" , False));
FieldsStructure.Insert("oldchar_field" , New Structure("OLDCHAR" , 2));
FieldsStructure.Insert("smallint_field" , New Structure("SMALLINT" , 10));
FieldsStructure.Insert("smallserial_field", New Structure("SMALLSERIAL" , 10));
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "oid_field");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", New Structure("OID", 24576));
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
```
@@ -0,0 +1,4 @@
{
"Адрес": "93.125.42.204",
"Пароль": "12we..."
}
@@ -0,0 +1,4 @@
{
"Адрес": "93.125.42.204",
"Пароль": "12we..."
}
@@ -3,6 +3,10 @@
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Таблица = "testtable";
@@ -0,0 +1,31 @@
Адрес = "93.125.42.204";
Логин = "bayselonarrend";
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Таблица = "testtable";
СтруктураПолей = Новый Структура;
СтруктураПолей.Вставить("bool_field" , Новый Структура("BOOL" , Ложь));
СтруктураПолей.Вставить("oldchar_field" , Новый Структура("OLDCHAR" , 2));
СтруктураПолей.Вставить("smallint_field" , Новый Структура("SMALLINT" , 10));
СтруктураПолей.Вставить("smallserial_field", Новый Структура("SMALLSERIAL" , 10));
Фильтры = Новый Массив;
СтруктураФильтра = Новый Структура;
СтруктураФильтра.Вставить("field", "oid_field");
СтруктураФильтра.Вставить("type" , "=");
СтруктураФильтра.Вставить("value", Новый Структура("OID", 24576));
СтруктураФильтра.Вставить("raw" , Ложь);
Фильтры.Добавить(СтруктураФильтра);
Результат = OPI_PostgreSQl.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
@@ -0,0 +1,12 @@
Адрес = "93.125.42.204";
Логин = "bayselonarrend";
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
@@ -0,0 +1 @@
Результат = OPI_PostgreSQL.ПолучитьСтруктуруФильтраЗаписей();
+5 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 8
---
import Tabs from '@theme/Tabs';
@@ -37,6 +37,10 @@ import TabItem from '@theme/TabItem';
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Таблица = "testtable";
+6 -2
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
@@ -45,4 +45,8 @@ import TabItem from '@theme/TabItem';
```json title="Результат"
{
"result": true
}
```
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 11
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 7
---
import Tabs from '@theme/Tabs';
@@ -0,0 +1,46 @@
---
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Отключить все соединения базы данных
Завершает все соединения к базе данных кроме текущего
`Функция ОтключитьВсеСоединенияБазыДанных(Знач База, Знач Соединение = "") Экспорт`
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|-|-|-|-|-|
| База | --base | Строка | &#x2714; | Имя базы |
| Соединение | --dbc | Строка, Произвольный | &#x2716; | Соединение или строка подключения |
Возвращаемое значение: Структура Из КлючИЗначение - Результат выполнения запроса
<br/>
```bsl title="Пример использования для 1С:Предприятие/OneScript"
Адрес = "93.125.42.204";
Логин = "bayselonarrend";
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
```
+2 -2
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 12
---
import Tabs from '@theme/Tabs';
@@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem';
```bsl title="Пример использования для 1С:Предприятие/OneScript"
Результат = OPI_PostgreSQL.ПолучитьСтруктуруФильтраЗаписей();
```
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 9
---
import Tabs from '@theme/Tabs';
+1 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
+31 -1
View File
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 10
---
import Tabs from '@theme/Tabs';
@@ -28,7 +28,37 @@ import TabItem from '@theme/TabItem';
```bsl title="Пример использования для 1С:Предприятие/OneScript"
Адрес = "93.125.42.204";
Логин = "bayselonarrend";
Пароль = "12we...";
База = "testbase1";
// При использовании строки подключения инициализируется новое соединение,
// которое будет закрыто после выполнения функции.
// В случае выполнения нескольких операций желательно использовать одно соединение,
// заранее созданное функцией ОткрытьСоединение()
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
Таблица = "testtable";
СтруктураПолей = Новый Структура;
СтруктураПолей.Вставить("bool_field" , Новый Структура("BOOL" , Ложь));
СтруктураПолей.Вставить("oldchar_field" , Новый Структура("OLDCHAR" , 2));
СтруктураПолей.Вставить("smallint_field" , Новый Структура("SMALLINT" , 10));
СтруктураПолей.Вставить("smallserial_field", Новый Структура("SMALLSERIAL" , 10));
Фильтры = Новый Массив;
СтруктураФильтра = Новый Структура;
СтруктураФильтра.Вставить("field", "oid_field");
СтруктураФильтра.Вставить("type" , "=");
СтруктураФильтра.Вставить("value", Новый Структура("OID", 24576));
СтруктураФильтра.Вставить("raw" , Ложь);
Фильтры.Добавить(СтруктураФильтра);
Результат = OPI_PostgreSQl.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
```