mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-04-09 07:14:16 +02:00
Main build (Jenkins)
This commit is contained in:
parent
440e8d4636
commit
c4cf4f1432
20
ci/clitesten
vendored
20
ci/clitesten
vendored
@ -1769,6 +1769,10 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres DropDatabase --base "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres DisableAllDatabaseConnections --base "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres GetTableInformation --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
@ -1777,6 +1781,14 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres CreateTable --table "test" --cols "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ClearTable --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres DeleteTable --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres AddRecords --table "test" --rows "test" --trn "test" --dbc "test" --debug --test '
|
||||
}
|
||||
@ -1793,14 +1805,6 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres DeletePosts --table "test" --filter "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres DeleteTable --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ClearTable --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres GetRecordsFilterStrucutre --empty "test" --debug --test '
|
||||
}
|
||||
|
20
ci/clitestru
vendored
20
ci/clitestru
vendored
@ -1769,6 +1769,10 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres УдалитьБазуДанных --base "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ОтключитьВсеСоединенияБазыДанных --base "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ПолучитьИнформациюОТаблице --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
@ -1777,6 +1781,14 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres СоздатьТаблицу --table "test" --cols "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ОчиститьТаблицу --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres УдалитьТаблицу --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ДобавитьЗаписи --table "test" --rows "test" --trn "test" --dbc "test" --debug --test '
|
||||
}
|
||||
@ -1793,14 +1805,6 @@ def test_postgres(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres УдалитьЗаписи --table "test" --filter "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres УдалитьТаблицу --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ОчиститьТаблицу --table "test" --dbc "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe postgres ПолучитьСтруктуруФильтраЗаписей --empty "test" --debug --test '
|
||||
}
|
||||
|
4
docs/en/data/PostgreSQL/DisableAllDatabaseConnections.json
vendored
Normal file
4
docs/en/data/PostgreSQL/DisableAllDatabaseConnections.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Address": "93.125.42.204",
|
||||
"Password": "12we..."
|
||||
}
|
4
docs/en/data/PostgreSQL/UpdateRecords.json
vendored
Normal file
4
docs/en/data/PostgreSQL/UpdateRecords.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Address": "93.125.42.204",
|
||||
"Password": "12we..."
|
||||
}
|
4
docs/en/examples/PostgreSQL/AddRecords.txt
vendored
4
docs/en/examples/PostgreSQL/AddRecords.txt
vendored
@ -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";
|
||||
|
12
docs/en/examples/PostgreSQL/DisableAllDatabaseConnections.txt
vendored
Normal file
12
docs/en/examples/PostgreSQL/DisableAllDatabaseConnections.txt
vendored
Normal file
@ -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);
|
1
docs/en/examples/PostgreSQL/GetRecordsFilterStrucutre.txt
vendored
Normal file
1
docs/en/examples/PostgreSQL/GetRecordsFilterStrucutre.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre();
|
31
docs/en/examples/PostgreSQL/UpdateRecords.txt
vendored
Normal file
31
docs/en/examples/PostgreSQL/UpdateRecords.txt
vendored
Normal 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);
|
6
docs/en/md/PostgreSQL/Orm/Add-records.mdx
vendored
6
docs/en/md/PostgreSQL/Orm/Add-records.mdx
vendored
@ -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";
|
||||
|
2
docs/en/md/PostgreSQL/Orm/Clear-table.mdx
vendored
2
docs/en/md/PostgreSQL/Orm/Clear-table.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
2
docs/en/md/PostgreSQL/Orm/Create-table.mdx
vendored
2
docs/en/md/PostgreSQL/Orm/Create-table.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
2
docs/en/md/PostgreSQL/Orm/Delete-posts.mdx
vendored
2
docs/en/md/PostgreSQL/Orm/Delete-posts.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
2
docs/en/md/PostgreSQL/Orm/Delete-table.mdx
vendored
2
docs/en/md/PostgreSQL/Orm/Delete-table.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
46
docs/en/md/PostgreSQL/Orm/Disable-all-database-connections.mdx
vendored
Normal file
46
docs/en/md/PostgreSQL/Orm/Disable-all-database-connections.mdx
vendored
Normal file
@ -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);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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();
|
||||
```
|
||||
|
||||
|
||||
|
2
docs/en/md/PostgreSQL/Orm/Get-records.mdx
vendored
2
docs/en/md/PostgreSQL/Orm/Get-records.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
32
docs/en/md/PostgreSQL/Orm/Update-records.mdx
vendored
32
docs/en/md/PostgreSQL/Orm/Update-records.mdx
vendored
@ -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);
|
||||
```
|
||||
|
||||
|
||||
|
4
docs/ru/data/PostgreSQL/ОбновитьЗаписи.json
vendored
Normal file
4
docs/ru/data/PostgreSQL/ОбновитьЗаписи.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Адрес": "93.125.42.204",
|
||||
"Пароль": "12we..."
|
||||
}
|
4
docs/ru/data/PostgreSQL/ОтключитьВсеСоединенияБазыДанных.json
vendored
Normal file
4
docs/ru/data/PostgreSQL/ОтключитьВсеСоединенияБазыДанных.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Адрес": "93.125.42.204",
|
||||
"Пароль": "12we..."
|
||||
}
|
@ -3,6 +3,10 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
31
docs/ru/examples/PostgreSQL/ОбновитьЗаписи.txt
vendored
Normal file
31
docs/ru/examples/PostgreSQL/ОбновитьЗаписи.txt
vendored
Normal file
@ -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.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
|
12
docs/ru/examples/PostgreSQL/ОтключитьВсеСоединенияБазыДанных.txt
vendored
Normal file
12
docs/ru/examples/PostgreSQL/ОтключитьВсеСоединенияБазыДанных.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
Адрес = "93.125.42.204";
|
||||
Логин = "bayselonarrend";
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
|
1
docs/ru/examples/PostgreSQL/ПолучитьСтруктуруФильтраЗаписей.txt
vendored
Normal file
1
docs/ru/examples/PostgreSQL/ПолучитьСтруктуруФильтраЗаписей.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
Результат = OPI_PostgreSQL.ПолучитьСтруктуруФильтраЗаписей();
|
6
docs/ru/md/PostgreSQL/Orm/Add-records.mdx
vendored
6
docs/ru/md/PostgreSQL/Orm/Add-records.mdx
vendored
@ -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";
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Clear-table.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Clear-table.mdx
vendored
@ -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
|
||||
}
|
||||
```
|
||||
|
2
docs/ru/md/PostgreSQL/Orm/Create-table.mdx
vendored
2
docs/ru/md/PostgreSQL/Orm/Create-table.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
2
docs/ru/md/PostgreSQL/Orm/Delete-posts.mdx
vendored
2
docs/ru/md/PostgreSQL/Orm/Delete-posts.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
2
docs/ru/md/PostgreSQL/Orm/Delete-table.mdx
vendored
2
docs/ru/md/PostgreSQL/Orm/Delete-table.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
46
docs/ru/md/PostgreSQL/Orm/Disable-all-database-connections.mdx
vendored
Normal file
46
docs/ru/md/PostgreSQL/Orm/Disable-all-database-connections.mdx
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Отключить все соединения базы данных
|
||||
Завершает все соединения к базе данных кроме текущего
|
||||
|
||||
|
||||
|
||||
`Функция ОтключитьВсеСоединенияБазыДанных(Знач База, Знач Соединение = "") Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
| База | --base | Строка | ✔ | Имя базы |
|
||||
| Соединение | --dbc | Строка, Произвольный | ✖ | Соединение или строка подключения |
|
||||
|
||||
|
||||
Возвращаемое значение: Структура Из КлючИЗначение - Результат выполнения запроса
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Адрес = "93.125.42.204";
|
||||
Логин = "bayselonarrend";
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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.ПолучитьСтруктуруФильтраЗаписей();
|
||||
```
|
||||
|
||||
|
||||
|
2
docs/ru/md/PostgreSQL/Orm/Get-records.mdx
vendored
2
docs/ru/md/PostgreSQL/Orm/Get-records.mdx
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
|
32
docs/ru/md/PostgreSQL/Orm/Update-records.mdx
vendored
32
docs/ru/md/PostgreSQL/Orm/Update-records.mdx
vendored
@ -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.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
||||
|
12950
service/dictionaries/en.json
vendored
12950
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
89
src/en/OInt/core/Modules/OPI_PostgreSQL.os
vendored
89
src/en/OInt/core/Modules/OPI_PostgreSQL.os
vendored
@ -232,6 +232,31 @@ Function DropDatabase(Val Base, Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Disable all database connections
|
||||
// Terminates all connections to the database except the current one
|
||||
//
|
||||
// Parameters:
|
||||
// Base - String - Database name - base
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue - Result of query execution
|
||||
Function DisableAllDatabaseConnections(Val Base, Val Connection = "") Export
|
||||
|
||||
OPI_TypeConversion.GetLine(Base);
|
||||
|
||||
TextSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
|
||||
TextSQL = StrTemplate(TextSQL, Base);
|
||||
|
||||
Result = ExecuteSQLQuery(TextSQL, , , Connection);
|
||||
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get table information
|
||||
// Gets information about the table
|
||||
//
|
||||
@ -274,6 +299,38 @@ Function CreateTable(Val Table, Val ColoumnsStruct, Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Clear table
|
||||
// Clears the database table
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function ClearTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeletePosts(OPI_PostgreSQL, Table, , Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete table
|
||||
// Deletes a table from the database
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function DeleteTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeleteTable(OPI_PostgreSQL, Table, Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Add rows
|
||||
// Adds new rows to the table
|
||||
//
|
||||
@ -358,38 +415,6 @@ Function DeletePosts(Val Table, Val Filters = "", Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete table
|
||||
// Deletes a table from the database
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function DeleteTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeleteTable(OPI_PostgreSQL, Table, Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Clear table
|
||||
// Clears the database table
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function ClearTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeletePosts(OPI_PostgreSQL, Table, , Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get records filter strucutre
|
||||
// Gets the template structure for filtering records in ORM queries
|
||||
//
|
||||
|
105
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
105
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
@ -2340,9 +2340,12 @@ Procedure Postgres_ORM() Export
|
||||
PostgreSQL_GetTableInformation(TestParameters);
|
||||
PostgreSQL_AddRecords(TestParameters);
|
||||
PostgreSQL_GetRecords(TestParameters);
|
||||
PostgreSQL_UpdateRecords(TestParameters);
|
||||
PostgreSQL_ClearTable(TestParameters);
|
||||
PostgreSQL_DeleteTable(TestParameters);
|
||||
PostgreSQL_DisableAllDatabaseConnections(TestParameters);
|
||||
PostgreSQL_DropDatabase(TestParameters);
|
||||
PostgreSQL_GetRecordsFilterStrucutre(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
@ -17641,6 +17644,10 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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";
|
||||
@ -17760,6 +17767,57 @@ Procedure PostgreSQL_GetRecords(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "UpdateRecords", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
Check = OPI_PostgreSQl.GetRecords(Table
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Filters, , , ConnectionString);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Check, "UpdateRecords (check)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Check);
|
||||
OPI_TestDataRetrieval.Check_SQLiteFieldsValues(Check["data"][0], FieldsStructure);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_DeleteTable(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
@ -17813,6 +17871,11 @@ Procedure PostgreSQL_DropDatabase(FunctionParameters)
|
||||
OPI_TestDataRetrieval.WriteLog(Connection, "DropDatabase (open)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_AddIn(Connection, "AddIn.OPI_PostgreSQL.Main");
|
||||
|
||||
Result = OPI_PostgreSQL.DisableAllDatabaseConnections(Base, Connection);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DropDatabase (Shutdown)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
Result = OPI_PostgreSQL.DropDatabase(Base, Connection);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DropDatabase (connect)", "PostgreSQL");
|
||||
@ -17865,6 +17928,48 @@ Procedure PostgreSQL_ClearTable(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_DisableAllDatabaseConnections(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DisableAllDatabaseConnections", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_GetRecordsFilterStrucutre(FunctionParameters)
|
||||
|
||||
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre();
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecordsFilterStrucutre", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_Structure(Result);
|
||||
|
||||
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre(True);
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecordsFilterStrucutre (empty)", "PostgreSQL");
|
||||
|
||||
For Each Element In Result Do
|
||||
|
||||
OPI_TestDataRetrieval.Check_Empty(Element.Value);
|
||||
|
||||
EndDo;
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -232,6 +232,31 @@ Function DropDatabase(Val Base, Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Disable all database connections
|
||||
// Terminates all connections to the database except the current one
|
||||
//
|
||||
// Parameters:
|
||||
// Base - String - Database name - base
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue - Result of query execution
|
||||
Function DisableAllDatabaseConnections(Val Base, Val Connection = "") Export
|
||||
|
||||
OPI_TypeConversion.GetLine(Base);
|
||||
|
||||
TextSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
|
||||
TextSQL = StrTemplate(TextSQL, Base);
|
||||
|
||||
Result = ExecuteSQLQuery(TextSQL, , , Connection);
|
||||
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get table information
|
||||
// Gets information about the table
|
||||
//
|
||||
@ -274,6 +299,38 @@ Function CreateTable(Val Table, Val ColoumnsStruct, Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Clear table
|
||||
// Clears the database table
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function ClearTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeletePosts(OPI_PostgreSQL, Table, , Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete table
|
||||
// Deletes a table from the database
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function DeleteTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeleteTable(OPI_PostgreSQL, Table, Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Add rows
|
||||
// Adds new rows to the table
|
||||
//
|
||||
@ -358,38 +415,6 @@ Function DeletePosts(Val Table, Val Filters = "", Val Connection = "") Export
|
||||
|
||||
EndFunction
|
||||
|
||||
// Delete table
|
||||
// Deletes a table from the database
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function DeleteTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeleteTable(OPI_PostgreSQL, Table, Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Clear table
|
||||
// Clears the database table
|
||||
//
|
||||
// Parameters:
|
||||
// Table - String - Table name - table
|
||||
// Connection - String, Arbitrary - Connection or connection string - dbc
|
||||
//
|
||||
// Returns:
|
||||
// Structure Of KeyAndValue, String - Result of query execution
|
||||
Function ClearTable(Val Table, Val Connection = "") Export
|
||||
|
||||
Result = OPI_SQLQueries.DeletePosts(OPI_PostgreSQL, Table, , Connection);
|
||||
Return Result;
|
||||
|
||||
EndFunction
|
||||
|
||||
// Get records filter strucutre
|
||||
// Gets the template structure for filtering records in ORM queries
|
||||
//
|
||||
|
105
src/en/OPI/src/CommonModules/OPI_Tests/Module.bsl
vendored
105
src/en/OPI/src/CommonModules/OPI_Tests/Module.bsl
vendored
@ -2340,9 +2340,12 @@ Procedure Postgres_ORM() Export
|
||||
PostgreSQL_GetTableInformation(TestParameters);
|
||||
PostgreSQL_AddRecords(TestParameters);
|
||||
PostgreSQL_GetRecords(TestParameters);
|
||||
PostgreSQL_UpdateRecords(TestParameters);
|
||||
PostgreSQL_ClearTable(TestParameters);
|
||||
PostgreSQL_DeleteTable(TestParameters);
|
||||
PostgreSQL_DisableAllDatabaseConnections(TestParameters);
|
||||
PostgreSQL_DropDatabase(TestParameters);
|
||||
PostgreSQL_GetRecordsFilterStrucutre(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
@ -17641,6 +17644,10 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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";
|
||||
@ -17760,6 +17767,57 @@ Procedure PostgreSQL_GetRecords(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "UpdateRecords", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
Check = OPI_PostgreSQl.GetRecords(Table
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Filters, , , ConnectionString);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Check, "UpdateRecords (check)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Check);
|
||||
OPI_TestDataRetrieval.Check_SQLiteFieldsValues(Check["data"][0], FieldsStructure);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_DeleteTable(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
@ -17813,6 +17871,11 @@ Procedure PostgreSQL_DropDatabase(FunctionParameters)
|
||||
OPI_TestDataRetrieval.WriteLog(Connection, "DropDatabase (open)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_AddIn(Connection, "AddIn.OPI_PostgreSQL.Main");
|
||||
|
||||
Result = OPI_PostgreSQL.DisableAllDatabaseConnections(Base, Connection);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DropDatabase (Shutdown)", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
Result = OPI_PostgreSQL.DropDatabase(Base, Connection);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DropDatabase (connect)", "PostgreSQL");
|
||||
@ -17865,6 +17928,48 @@ Procedure PostgreSQL_ClearTable(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_DisableAllDatabaseConnections(FunctionParameters)
|
||||
|
||||
Address = FunctionParameters["PG_IP"];
|
||||
Login = "bayselonarrend";
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
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);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DisableAllDatabaseConnections", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_ResultTrue(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure PostgreSQL_GetRecordsFilterStrucutre(FunctionParameters)
|
||||
|
||||
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre();
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecordsFilterStrucutre", "PostgreSQL");
|
||||
OPI_TestDataRetrieval.Check_Structure(Result);
|
||||
|
||||
Result = OPI_PostgreSQL.GetRecordsFilterStrucutre(True);
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecordsFilterStrucutre (empty)", "PostgreSQL");
|
||||
|
||||
For Each Element In Result Do
|
||||
|
||||
OPI_TestDataRetrieval.Check_Empty(Element.Value);
|
||||
|
||||
EndDo;
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
105
src/en/cli/data/Classes/internal/Classes/postgres.os
vendored
105
src/en/cli/data/Classes/internal/Classes/postgres.os
vendored
@ -144,6 +144,27 @@
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DisableAllDatabaseConnections";
|
||||
NewLine.МетодПоиска = "DISABLEALLDATABASECONNECTIONS";
|
||||
NewLine.Параметр = "--base";
|
||||
NewLine.Описание = "Database name";
|
||||
NewLine.Область = "Orm";
|
||||
NewLine.ОписаниеМетода = "Terminates all connections to the database except the current one";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DisableAllDatabaseConnections";
|
||||
NewLine.МетодПоиска = "DISABLEALLDATABASECONNECTIONS";
|
||||
NewLine.Параметр = "--dbc";
|
||||
NewLine.Описание = "Connection or connection string (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
@ -196,6 +217,48 @@
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "ClearTable";
|
||||
NewLine.МетодПоиска = "CLEARTABLE";
|
||||
NewLine.Параметр = "--table";
|
||||
NewLine.Описание = "Table name";
|
||||
NewLine.Область = "Orm";
|
||||
NewLine.ОписаниеМетода = "Clears the database table";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "ClearTable";
|
||||
NewLine.МетодПоиска = "CLEARTABLE";
|
||||
NewLine.Параметр = "--dbc";
|
||||
NewLine.Описание = "Connection or connection string (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DeleteTable";
|
||||
NewLine.МетодПоиска = "DELETETABLE";
|
||||
NewLine.Параметр = "--table";
|
||||
NewLine.Описание = "Table name";
|
||||
NewLine.Область = "Orm";
|
||||
NewLine.ОписаниеМетода = "Deletes a table from the database";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DeleteTable";
|
||||
NewLine.МетодПоиска = "DELETETABLE";
|
||||
NewLine.Параметр = "--dbc";
|
||||
NewLine.Описание = "Connection or connection string (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
@ -370,48 +433,6 @@
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DeleteTable";
|
||||
NewLine.МетодПоиска = "DELETETABLE";
|
||||
NewLine.Параметр = "--table";
|
||||
NewLine.Описание = "Table name";
|
||||
NewLine.Область = "Orm";
|
||||
NewLine.ОписаниеМетода = "Deletes a table from the database";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "DeleteTable";
|
||||
NewLine.МетодПоиска = "DELETETABLE";
|
||||
NewLine.Параметр = "--dbc";
|
||||
NewLine.Описание = "Connection or connection string (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "ClearTable";
|
||||
NewLine.МетодПоиска = "CLEARTABLE";
|
||||
NewLine.Параметр = "--table";
|
||||
NewLine.Описание = "Table name";
|
||||
NewLine.Область = "Orm";
|
||||
NewLine.ОписаниеМетода = "Clears the database table";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
NewLine.Метод = "ClearTable";
|
||||
NewLine.МетодПоиска = "CLEARTABLE";
|
||||
NewLine.Параметр = "--dbc";
|
||||
NewLine.Описание = "Connection or connection string (optional, def. val. - Empty value)";
|
||||
NewLine.Область = "Orm";
|
||||
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "postgres";
|
||||
NewLine.Модуль = "OPI_PostgreSQL";
|
||||
|
18
src/ru/OInt/core/Modules/OPI_PostgreSQL.os
vendored
18
src/ru/OInt/core/Modules/OPI_PostgreSQL.os
vendored
@ -234,7 +234,7 @@
|
||||
|
||||
// Отключить все соединения базы данных
|
||||
// Завершает все соединения к базе данных кроме текущего
|
||||
//
|
||||
//
|
||||
// Параметры:
|
||||
// База - Строка - Имя базы - base
|
||||
// Соединение - Строка, Произвольный - Соединение или строка подключения - dbc
|
||||
@ -242,21 +242,21 @@
|
||||
// Возвращаемое значение:
|
||||
// Структура Из КлючИЗначение - Результат выполнения запроса
|
||||
Функция ОтключитьВсеСоединенияБазыДанных(Знач База, Знач Соединение = "") Экспорт
|
||||
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(База);
|
||||
|
||||
ТекстSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
ТекстSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
|
||||
ТекстSQL = СтрШаблон(ТекстSQL, База);
|
||||
|
||||
Результат = ВыполнитьЗапросSQL(ТекстSQL, , , Соединение);
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
КонецФункции
|
||||
|
||||
|
||||
// Получить информацию о таблице
|
||||
// Получает информацию о таблице
|
||||
//
|
||||
@ -270,7 +270,7 @@
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Таблица);
|
||||
|
||||
ТекстSQL = "SELECT column_name, data_type, character_maximum_length
|
||||
ТекстSQL = "SELECT column_name, data_type, character_maximum_length
|
||||
|FROM information_schema.columns
|
||||
|WHERE table_name = '%1';";
|
||||
|
||||
|
16
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
16
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
@ -17807,10 +17807,10 @@
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Результат);
|
||||
|
||||
Проверка = OPI_PostgreSQl.ПолучитьЗаписи(Таблица
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Фильтры, , , СтрокаПодключения);
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Фильтры, , , СтрокаПодключения);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Проверка, "ОбновитьЗаписи (проверка)", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Проверка);
|
||||
@ -17870,7 +17870,7 @@
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Подключение, "УдалитьБазуДанных (открытие)", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_Компонента(Подключение, "AddIn.OPI_PostgreSQL.Main");
|
||||
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, Подключение);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "УдалитьБазуДанных (отключение)", "PostgreSQL");
|
||||
@ -17929,8 +17929,8 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура PostgreSQL_ОтключитьВсеСоединенияБазыДанных(ПараметрыФункции)
|
||||
|
||||
Адрес = ПараметрыФункции["PG_IP"];
|
||||
|
||||
Адрес = ПараметрыФункции["PG_IP"];
|
||||
Логин = "bayselonarrend";
|
||||
Пароль = ПараметрыФункции["PG_Password"];
|
||||
База = "testbase1";
|
||||
@ -17947,7 +17947,7 @@
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтключитьВсеСоединенияБазыДанных", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Результат);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура PostgreSQL_ПолучитьСтруктуруФильтраЗаписей(ПараметрыФункции)
|
||||
|
@ -2155,9 +2155,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@ -234,7 +234,7 @@
|
||||
|
||||
// Отключить все соединения базы данных
|
||||
// Завершает все соединения к базе данных кроме текущего
|
||||
//
|
||||
//
|
||||
// Параметры:
|
||||
// База - Строка - Имя базы - base
|
||||
// Соединение - Строка, Произвольный - Соединение или строка подключения - dbc
|
||||
@ -242,21 +242,21 @@
|
||||
// Возвращаемое значение:
|
||||
// Структура Из КлючИЗначение - Результат выполнения запроса
|
||||
Функция ОтключитьВсеСоединенияБазыДанных(Знач База, Знач Соединение = "") Экспорт
|
||||
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(База);
|
||||
|
||||
ТекстSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
ТекстSQL = "SELECT pg_terminate_backend(pid)
|
||||
|FROM pg_stat_activity
|
||||
|WHERE datname = '%1' AND pid <> pg_backend_pid();";
|
||||
|
||||
ТекстSQL = СтрШаблон(ТекстSQL, База);
|
||||
|
||||
Результат = ВыполнитьЗапросSQL(ТекстSQL, , , Соединение);
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
Возврат Результат;
|
||||
|
||||
КонецФункции
|
||||
|
||||
|
||||
// Получить информацию о таблице
|
||||
// Получает информацию о таблице
|
||||
//
|
||||
@ -270,7 +270,7 @@
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Таблица);
|
||||
|
||||
ТекстSQL = "SELECT column_name, data_type, character_maximum_length
|
||||
ТекстSQL = "SELECT column_name, data_type, character_maximum_length
|
||||
|FROM information_schema.columns
|
||||
|WHERE table_name = '%1';";
|
||||
|
||||
|
@ -17807,10 +17807,10 @@
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Результат);
|
||||
|
||||
Проверка = OPI_PostgreSQl.ПолучитьЗаписи(Таблица
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Фильтры, , , СтрокаПодключения);
|
||||
, "['bool_field'
|
||||
|,'smallserial_field'
|
||||
|, 'smallint_field']"
|
||||
, Фильтры, , , СтрокаПодключения);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Проверка, "ОбновитьЗаписи (проверка)", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Проверка);
|
||||
@ -17870,7 +17870,7 @@
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Подключение, "УдалитьБазуДанных (открытие)", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_Компонента(Подключение, "AddIn.OPI_PostgreSQL.Main");
|
||||
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, Подключение);
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "УдалитьБазуДанных (отключение)", "PostgreSQL");
|
||||
@ -17929,8 +17929,8 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура PostgreSQL_ОтключитьВсеСоединенияБазыДанных(ПараметрыФункции)
|
||||
|
||||
Адрес = ПараметрыФункции["PG_IP"];
|
||||
|
||||
Адрес = ПараметрыФункции["PG_IP"];
|
||||
Логин = "bayselonarrend";
|
||||
Пароль = ПараметрыФункции["PG_Password"];
|
||||
База = "testbase1";
|
||||
@ -17947,7 +17947,7 @@
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ОтключитьВсеСоединенияБазыДанных", "PostgreSQL");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_РезультатИстина(Результат);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура PostgreSQL_ПолучитьСтруктуруФильтраЗаписей(ПараметрыФункции)
|
||||
|
105
src/ru/cli/data/Classes/internal/Classes/postgres.os
vendored
105
src/ru/cli/data/Classes/internal/Classes/postgres.os
vendored
@ -148,6 +148,27 @@
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОтключитьВсеСоединенияБазыДанных";
|
||||
НоваяСтрока.МетодПоиска = "ОТКЛЮЧИТЬВСЕСОЕДИНЕНИЯБАЗЫДАННЫХ";
|
||||
НоваяСтрока.Параметр = "--base";
|
||||
НоваяСтрока.Описание = "Имя базы";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
НоваяСтрока.ОписаниеМетода = "Завершает все соединения к базе данных кроме текущего";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОтключитьВсеСоединенияБазыДанных";
|
||||
НоваяСтрока.МетодПоиска = "ОТКЛЮЧИТЬВСЕСОЕДИНЕНИЯБАЗЫДАННЫХ";
|
||||
НоваяСтрока.Параметр = "--dbc";
|
||||
НоваяСтрока.Описание = "Соединение или строка подключения (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
@ -200,6 +221,48 @@
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОчиститьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "ОЧИСТИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--table";
|
||||
НоваяСтрока.Описание = "Имя таблицы";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
НоваяСтрока.ОписаниеМетода = "Очищает таблицу базы";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОчиститьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "ОЧИСТИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--dbc";
|
||||
НоваяСтрока.Описание = "Соединение или строка подключения (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "УдалитьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--table";
|
||||
НоваяСтрока.Описание = "Имя таблицы";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
НоваяСтрока.ОписаниеМетода = "Удаляет таблицу из базы";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "УдалитьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--dbc";
|
||||
НоваяСтрока.Описание = "Соединение или строка подключения (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
@ -390,48 +453,6 @@
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "УдалитьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--table";
|
||||
НоваяСтрока.Описание = "Имя таблицы";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
НоваяСтрока.ОписаниеМетода = "Удаляет таблицу из базы";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "УдалитьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "УДАЛИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--dbc";
|
||||
НоваяСтрока.Описание = "Соединение или строка подключения (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОчиститьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "ОЧИСТИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--table";
|
||||
НоваяСтрока.Описание = "Имя таблицы";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
НоваяСтрока.ОписаниеМетода = "Очищает таблицу базы";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
НоваяСтрока.Метод = "ОчиститьТаблицу";
|
||||
НоваяСтрока.МетодПоиска = "ОЧИСТИТЬТАБЛИЦУ";
|
||||
НоваяСтрока.Параметр = "--dbc";
|
||||
НоваяСтрока.Описание = "Соединение или строка подключения (необяз. по ум. - Пустое значение)";
|
||||
НоваяСтрока.Область = "Orm";
|
||||
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "postgres";
|
||||
НоваяСтрока.Модуль = "OPI_PostgreSQL";
|
||||
|
Loading…
x
Reference in New Issue
Block a user