You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-09-16 09:16:24 +02:00
Main build (Jenkins)
This commit is contained in:
16
docs/en/examples/PostgreSQL/AddRecords.txt
vendored
16
docs/en/examples/PostgreSQL/AddRecords.txt
vendored
@@ -3,10 +3,6 @@
|
||||
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";
|
||||
@@ -16,7 +12,9 @@
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
CasualStructure = New Structure("key,value", "ItsKey", 10);
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
CurrentDateTZ = OPI_Tools.DateRFC3339(CurrentDate, "+05:00");
|
||||
|
||||
RecordStructure = New Structure;
|
||||
RecordStructure.Insert("bool_field" , New Structure("BOOL" , True));
|
||||
@@ -36,8 +34,8 @@
|
||||
RecordStructure.Insert("char_field" , New Structure("CHAR" , "A"));
|
||||
RecordStructure.Insert("name_field" , New Structure("NAME" , "Vitaly"));
|
||||
RecordStructure.Insert("bytea_field" , New Structure("BYTEA" , Image));
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , 1739207915));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , CurrentDate));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", CurrentDateTZ)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ip_field" , New Structure("INET" , "127.0.0.1"));
|
||||
RecordStructure.Insert("json_field" , New Structure("JSON" , CasualStructure));
|
||||
RecordStructure.Insert("jsonb_field" , New Structure("JSONB" , CasualStructure));
|
||||
@@ -47,4 +45,8 @@
|
||||
|
||||
RecordsArray.Add(RecordStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.AddRecords(Table, RecordsArray, True, ConnectionString);
|
||||
|
8
docs/en/examples/PostgreSQL/ClearTable.txt
vendored
8
docs/en/examples/PostgreSQL/ClearTable.txt
vendored
@@ -3,12 +3,12 @@
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.ClearTable(Table, ConnectionString);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Password = "12we...";
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.CreateDatabase(Base, ConnectionString);
|
||||
|
8
docs/en/examples/PostgreSQL/CreateTable.txt
vendored
8
docs/en/examples/PostgreSQL/CreateTable.txt
vendored
@@ -3,10 +3,6 @@
|
||||
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";
|
||||
@@ -38,4 +34,8 @@
|
||||
ColoumnsStruct.Insert("time_field" , "TIME");
|
||||
ColoumnsStruct.Insert("uuid_field" , "UUID");
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateTable(Table, ColoumnsStruct, ConnectionString);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Password = "12we...";
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString);
|
||||
|
10
docs/en/examples/PostgreSQL/DeleteRecords.txt
vendored
10
docs/en/examples/PostgreSQL/DeleteRecords.txt
vendored
@@ -3,10 +3,6 @@
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -30,4 +26,8 @@
|
||||
FilterStructure.Insert("value", New Structure("VARCHAR", "127.0.0.1"));
|
||||
FilterStructure.Insert("raw" , False);
|
||||
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
|
8
docs/en/examples/PostgreSQL/DeleteTable.txt
vendored
8
docs/en/examples/PostgreSQL/DeleteTable.txt
vendored
@@ -3,12 +3,12 @@
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteTable(Table, ConnectionString);
|
||||
|
@@ -3,10 +3,10 @@
|
||||
Password = "12we...";
|
||||
Base = "testbase1";
|
||||
|
||||
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
// 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);
|
||||
|
11
docs/en/examples/PostgreSQL/GetRecords.txt
vendored
11
docs/en/examples/PostgreSQL/GetRecords.txt
vendored
@@ -3,15 +3,16 @@
|
||||
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);
|
||||
|
||||
// All records without filters
|
||||
|
||||
Table = "testtable";
|
||||
Table = "testtable";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetRecords(Table, , , , , ConnectionString);
|
||||
|
||||
// Filter, selected fields, limit and sorting
|
||||
|
@@ -3,12 +3,12 @@
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetTableInformation(Table, ConnectionString);
|
||||
|
@@ -3,10 +3,6 @@
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -25,4 +21,8 @@
|
||||
|
||||
Filters.Add(FilterStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
|
||||
|
@@ -6,7 +6,7 @@ import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Is connector
|
||||
Checks that the value is an object of a SQLite AddIn
|
||||
Checks that the value is an object of a PostgreSQL AddIn
|
||||
|
||||
|
||||
|
||||
|
16
docs/en/md/PostgreSQL/Orm/Add-records.mdx
vendored
16
docs/en/md/PostgreSQL/Orm/Add-records.mdx
vendored
@@ -39,10 +39,6 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
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";
|
||||
@@ -52,7 +48,9 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
CasualStructure = New Structure("key,value", "ItsKey", 10);
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
CurrentDateTZ = OPI_Tools.DateRFC3339(CurrentDate, "+05:00");
|
||||
|
||||
RecordStructure = New Structure;
|
||||
RecordStructure.Insert("bool_field" , New Structure("BOOL" , True));
|
||||
@@ -72,8 +70,8 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
RecordStructure.Insert("char_field" , New Structure("CHAR" , "A"));
|
||||
RecordStructure.Insert("name_field" , New Structure("NAME" , "Vitaly"));
|
||||
RecordStructure.Insert("bytea_field" , New Structure("BYTEA" , Image));
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , 1739207915));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , CurrentDate));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", CurrentDateTZ)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ip_field" , New Structure("INET" , "127.0.0.1"));
|
||||
RecordStructure.Insert("json_field" , New Structure("JSON" , CasualStructure));
|
||||
RecordStructure.Insert("jsonb_field" , New Structure("JSONB" , CasualStructure));
|
||||
@@ -83,6 +81,10 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
|
||||
RecordsArray.Add(RecordStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.AddRecords(Table, RecordsArray, True, ConnectionString);
|
||||
```
|
||||
|
||||
|
8
docs/en/md/PostgreSQL/Orm/Clear-table.mdx
vendored
8
docs/en/md/PostgreSQL/Orm/Clear-table.mdx
vendored
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.ClearTable(Table, ConnectionString);
|
||||
```
|
||||
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Password = "12we...";
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.CreateDatabase(Base, ConnectionString);
|
||||
```
|
||||
|
||||
|
8
docs/en/md/PostgreSQL/Orm/Create-table.mdx
vendored
8
docs/en/md/PostgreSQL/Orm/Create-table.mdx
vendored
@@ -36,10 +36,6 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
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";
|
||||
@@ -71,6 +67,10 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
ColoumnsStruct.Insert("time_field" , "TIME");
|
||||
ColoumnsStruct.Insert("uuid_field" , "UUID");
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateTable(Table, ColoumnsStruct, ConnectionString);
|
||||
```
|
||||
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Password = "12we...";
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString);
|
||||
```
|
||||
|
||||
|
10
docs/en/md/PostgreSQL/Orm/Delete-records.mdx
vendored
10
docs/en/md/PostgreSQL/Orm/Delete-records.mdx
vendored
@@ -32,10 +32,6 @@ import TabItem from '@theme/TabItem';
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -59,7 +55,11 @@ import TabItem from '@theme/TabItem';
|
||||
FilterStructure.Insert("value", New Structure("VARCHAR", "127.0.0.1"));
|
||||
FilterStructure.Insert("raw" , False);
|
||||
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
```
|
||||
|
||||
|
||||
|
8
docs/en/md/PostgreSQL/Orm/Delete-table.mdx
vendored
8
docs/en/md/PostgreSQL/Orm/Delete-table.mdx
vendored
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteTable(Table, ConnectionString);
|
||||
```
|
||||
|
||||
|
@@ -31,12 +31,12 @@ import TabItem from '@theme/TabItem';
|
||||
Password = "12we...";
|
||||
Base = "testbase1";
|
||||
|
||||
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
// 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);
|
||||
```
|
||||
|
||||
|
11
docs/en/md/PostgreSQL/Orm/Get-records.mdx
vendored
11
docs/en/md/PostgreSQL/Orm/Get-records.mdx
vendored
@@ -35,15 +35,16 @@ import TabItem from '@theme/TabItem';
|
||||
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);
|
||||
|
||||
// All records without filters
|
||||
|
||||
Table = "testtable";
|
||||
Table = "testtable";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetRecords(Table, , , , , ConnectionString);
|
||||
|
||||
// Filter, selected fields, limit and sorting
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetTableInformation(Table, ConnectionString);
|
||||
```
|
||||
|
||||
|
8
docs/en/md/PostgreSQL/Orm/Update-records.mdx
vendored
8
docs/en/md/PostgreSQL/Orm/Update-records.mdx
vendored
@@ -39,10 +39,6 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -61,6 +57,10 @@ The list of available types is described on the initial page of the PostgreSQL l
|
||||
|
||||
Filters.Add(FilterStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
|
||||
```
|
||||
|
||||
|
16
docs/ru/examples/PostgreSQL/ДобавитьЗаписи.txt
vendored
16
docs/ru/examples/PostgreSQL/ДобавитьЗаписи.txt
vendored
@@ -3,10 +3,6 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
@@ -16,7 +12,9 @@
|
||||
OPI_ПреобразованиеТипов.ПолучитьДвоичныеДанные(Картинка); // Картинка - Тип: ДвоичныеДанные
|
||||
|
||||
СлучайнаяСтруктура = Новый Структура("key,value", "ItsKey", 10);
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
СтруктураЗаписи = Новый Структура;
|
||||
СтруктураЗаписи.Вставить("bool_field" , Новый Структура("BOOL" , Истина));
|
||||
@@ -36,8 +34,8 @@
|
||||
СтруктураЗаписи.Вставить("char_field" , Новый Структура("CHAR" , "A"));
|
||||
СтруктураЗаписи.Вставить("name_field" , Новый Структура("NAME" , "Vitaly"));
|
||||
СтруктураЗаписи.Вставить("bytea_field" , Новый Структура("BYTEA" , Картинка));
|
||||
СтруктураЗаписи.Вставить("ts_field" , Новый Структура("TIMESTAMP" , 1739207915));
|
||||
СтруктураЗаписи.Вставить("tswtz_field" , Новый Структура("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // или TIMESTAMP WITH TIME ZONE
|
||||
СтруктураЗаписи.Вставить("ts_field" , Новый Структура("TIMESTAMP" , ТекущаяДата));
|
||||
СтруктураЗаписи.Вставить("tswtz_field" , Новый Структура("TIMESTAMP_WITH_TIME_ZONE", ТекущаяДатаЧП)); // или TIMESTAMP WITH TIME ZONE
|
||||
СтруктураЗаписи.Вставить("ip_field" , Новый Структура("INET" , "127.0.0.1"));
|
||||
СтруктураЗаписи.Вставить("json_field" , Новый Структура("JSON" , СлучайнаяСтруктура));
|
||||
СтруктураЗаписи.Вставить("jsonb_field" , Новый Структура("JSONB" , СлучайнаяСтруктура));
|
||||
@@ -47,4 +45,8 @@
|
||||
|
||||
МассивЗаписей.Добавить(СтруктураЗаписи);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ДобавитьЗаписи(Таблица, МассивЗаписей, Истина, СтрокаПодключения);
|
||||
|
@@ -3,10 +3,6 @@
|
||||
Пароль = "12we...";
|
||||
База = "test_data";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "test_data";
|
||||
@@ -25,4 +21,8 @@
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQl.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
|
||||
|
@@ -3,10 +3,10 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ОчиститьТаблицу(Таблица, СтрокаПодключения);
|
||||
|
11
docs/ru/examples/PostgreSQL/ПолучитьЗаписи.txt
vendored
11
docs/ru/examples/PostgreSQL/ПолучитьЗаписи.txt
vendored
@@ -3,15 +3,16 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
// Все записи без отборов
|
||||
|
||||
Таблица = "testtable";
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ПолучитьЗаписи(Таблица, , , , , СтрокаПодключения);
|
||||
|
||||
// Отборы, выбранные поля, количество и сортировка
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ПолучитьИнформациюОТаблице(Таблица, СтрокаПодключения);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Пароль = "12we...";
|
||||
База = "postgres";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.СоздатьБазуДанных(База, СтрокаПодключения);
|
||||
|
@@ -3,10 +3,6 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
@@ -38,4 +34,8 @@
|
||||
СтруктураКолонок.Вставить("time_field" , "TIME");
|
||||
СтруктураКолонок.Вставить("uuid_field" , "UUID");
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.СоздатьТаблицу(Таблица, СтруктураКолонок, СтрокаПодключения);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Пароль = "12we...";
|
||||
База = "postgres";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьБазуДанных(База, СтрокаПодключения);
|
||||
|
@@ -3,10 +3,6 @@
|
||||
Пароль = "12we...";
|
||||
База = "test_data";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "test_data";
|
||||
@@ -30,4 +26,8 @@
|
||||
СтруктураФильтра.Вставить("value", Новый Структура("VARCHAR", "127.0.0.1"));
|
||||
СтруктураФильтра.Вставить("raw" , Ложь);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьЗаписи(Таблица, Фильтры, СтрокаПодключения);
|
||||
|
@@ -3,12 +3,12 @@
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьТаблицу(Таблица, СтрокаПодключения);
|
||||
|
@@ -6,7 +6,7 @@ import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Это коннектор
|
||||
Проверяет, что значение является объектом внешней компоненты SQLite
|
||||
Проверяет, что значение является объектом внешней компоненты PostgreSQL
|
||||
|
||||
|
||||
|
||||
|
16
docs/ru/md/PostgreSQL/Orm/Add-records.mdx
vendored
16
docs/ru/md/PostgreSQL/Orm/Add-records.mdx
vendored
@@ -39,10 +39,6 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
@@ -52,7 +48,9 @@ import TabItem from '@theme/TabItem';
|
||||
OPI_ПреобразованиеТипов.ПолучитьДвоичныеДанные(Картинка); // Картинка - Тип: ДвоичныеДанные
|
||||
|
||||
СлучайнаяСтруктура = Новый Структура("key,value", "ItsKey", 10);
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
СтруктураЗаписи = Новый Структура;
|
||||
СтруктураЗаписи.Вставить("bool_field" , Новый Структура("BOOL" , Истина));
|
||||
@@ -72,8 +70,8 @@ import TabItem from '@theme/TabItem';
|
||||
СтруктураЗаписи.Вставить("char_field" , Новый Структура("CHAR" , "A"));
|
||||
СтруктураЗаписи.Вставить("name_field" , Новый Структура("NAME" , "Vitaly"));
|
||||
СтруктураЗаписи.Вставить("bytea_field" , Новый Структура("BYTEA" , Картинка));
|
||||
СтруктураЗаписи.Вставить("ts_field" , Новый Структура("TIMESTAMP" , 1739207915));
|
||||
СтруктураЗаписи.Вставить("tswtz_field" , Новый Структура("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // или TIMESTAMP WITH TIME ZONE
|
||||
СтруктураЗаписи.Вставить("ts_field" , Новый Структура("TIMESTAMP" , ТекущаяДата));
|
||||
СтруктураЗаписи.Вставить("tswtz_field" , Новый Структура("TIMESTAMP_WITH_TIME_ZONE", ТекущаяДатаЧП)); // или TIMESTAMP WITH TIME ZONE
|
||||
СтруктураЗаписи.Вставить("ip_field" , Новый Структура("INET" , "127.0.0.1"));
|
||||
СтруктураЗаписи.Вставить("json_field" , Новый Структура("JSON" , СлучайнаяСтруктура));
|
||||
СтруктураЗаписи.Вставить("jsonb_field" , Новый Структура("JSONB" , СлучайнаяСтруктура));
|
||||
@@ -83,6 +81,10 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
МассивЗаписей.Добавить(СтруктураЗаписи);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ДобавитьЗаписи(Таблица, МассивЗаписей, Истина, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Clear-table.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Clear-table.mdx
vendored
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ОчиститьТаблицу(Таблица, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "postgres";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.СоздатьБазуДанных(База, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Create-table.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Create-table.mdx
vendored
@@ -36,10 +36,6 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
@@ -71,6 +67,10 @@ import TabItem from '@theme/TabItem';
|
||||
СтруктураКолонок.Вставить("time_field" , "TIME");
|
||||
СтруктураКолонок.Вставить("uuid_field" , "UUID");
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.СоздатьТаблицу(Таблица, СтруктураКолонок, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "postgres";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьБазуДанных(База, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Delete-records.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Delete-records.mdx
vendored
@@ -32,10 +32,6 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "test_data";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "test_data";
|
||||
@@ -59,6 +55,10 @@ import TabItem from '@theme/TabItem';
|
||||
СтруктураФильтра.Вставить("value", Новый Структура("VARCHAR", "127.0.0.1"));
|
||||
СтруктураФильтра.Вставить("raw" , Ложь);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьЗаписи(Таблица, Фильтры, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Delete-table.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Delete-table.mdx
vendored
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.УдалитьТаблицу(Таблица, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
@@ -31,12 +31,12 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Результат = OPI_PostgreSQL.ОтключитьВсеСоединенияБазыДанных(База, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
11
docs/ru/md/PostgreSQL/Orm/Get-records.mdx
vendored
11
docs/ru/md/PostgreSQL/Orm/Get-records.mdx
vendored
@@ -35,15 +35,16 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
// Все записи без отборов
|
||||
|
||||
Таблица = "testtable";
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ПолучитьЗаписи(Таблица, , , , , СтрокаПодключения);
|
||||
|
||||
// Отборы, выбранные поля, количество и сортировка
|
||||
|
@@ -31,14 +31,14 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "testbase1";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQL.ПолучитьИнформациюОТаблице(Таблица, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
8
docs/ru/md/PostgreSQL/Orm/Update-records.mdx
vendored
8
docs/ru/md/PostgreSQL/Orm/Update-records.mdx
vendored
@@ -39,10 +39,6 @@ import TabItem from '@theme/TabItem';
|
||||
Пароль = "12we...";
|
||||
База = "test_data";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
СтрокаПодключения = OPI_PostgreSQL.СформироватьСтрокуПодключения(Адрес, База, Логин, Пароль);
|
||||
|
||||
Таблица = "test_data";
|
||||
@@ -61,6 +57,10 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра);
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
// заранее созданное функцией ОткрытьСоединение()
|
||||
Результат = OPI_PostgreSQl.ОбновитьЗаписи(Таблица, СтруктураПолей, СтруктураФильтра, СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
13036
service/dictionaries/en.json
vendored
13036
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
13
src/en/OInt/core/Modules/OPI_PostgreSQL.os
vendored
13
src/en/OInt/core/Modules/OPI_PostgreSQL.os
vendored
@@ -101,7 +101,7 @@ Function CloseConnection(Val Connection) Export
|
||||
EndFunction
|
||||
|
||||
// Is connector !NOCLI
|
||||
// Checks that the value is an object of a SQLite AddIn
|
||||
// Checks that the value is an object of a PostgreSQL AddIn
|
||||
//
|
||||
// Parameters:
|
||||
// Value - Arbitrary - Value to check - value
|
||||
@@ -508,7 +508,7 @@ Function ProcessParameters(Val Parameters)
|
||||
|
||||
EndFunction
|
||||
|
||||
Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
Function ProcessParameter(CurrentParameter)
|
||||
|
||||
CurrentType = TypeOf(CurrentParameter);
|
||||
|
||||
@@ -520,6 +520,10 @@ Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
|
||||
CurrentParameter = String(CurrentParameter);
|
||||
|
||||
ElsIf CurrentType = Type("Date") Then
|
||||
|
||||
CurrentParameter = OPI_Tools.DateRFC3339(CurrentParameter);
|
||||
|
||||
ElsIf OPI_Tools.CollectionFieldExist(CurrentParameter, "BYTEA") Then
|
||||
|
||||
CurrentParameter = ProcessBlobStructure(CurrentParameter);
|
||||
@@ -538,14 +542,13 @@ Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
CurrentParameter[ParamElement.Key] = ProcessParameter(CurrentValue, True);
|
||||
CurrentParameter[ParamElement.Key] = ProcessParameter(CurrentValue);
|
||||
|
||||
EndDo;
|
||||
|
||||
Else
|
||||
|
||||
If Not OPI_Tools.IsPrimitiveType(CurrentParameter)
|
||||
And Not CurrentType = Type("Date") Then
|
||||
If Not OPI_Tools.IsPrimitiveType(CurrentParameter) Then
|
||||
OPI_TypeConversion.GetLine(CurrentParameter);
|
||||
EndIf;
|
||||
|
||||
|
98
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
98
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
@@ -17512,10 +17512,6 @@ Procedure PostgreSQL_CreateDatabase(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
Base = "testbase1";
|
||||
@@ -17523,6 +17519,10 @@ Procedure PostgreSQL_CreateDatabase(FunctionParameters)
|
||||
Deletion = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString); // SKIP
|
||||
OPI_TestDataRetrieval.WriteLog(Deletion, "CreateDatabase (deleting)", "PostgreSQL"); // SKIP
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateDatabase(Base, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17559,10 +17559,6 @@ Procedure PostgreSQL_CreateTable(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";
|
||||
@@ -17594,6 +17590,10 @@ Procedure PostgreSQL_CreateTable(FunctionParameters)
|
||||
ColoumnsStruct.Insert("time_field" , "TIME");
|
||||
ColoumnsStruct.Insert("uuid_field" , "UUID");
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateTable(Table, ColoumnsStruct, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17625,14 +17625,14 @@ Procedure PostgreSQL_GetTableInformation(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetTableInformation(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17656,10 +17656,6 @@ 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";
|
||||
@@ -17669,7 +17665,9 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
CasualStructure = New Structure("key,value", "ItsKey", 10);
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
CurrentDateTZ = OPI_Tools.DateRFC3339(CurrentDate, "+05:00");
|
||||
|
||||
RecordStructure = New Structure;
|
||||
RecordStructure.Insert("bool_field" , New Structure("BOOL" , True));
|
||||
@@ -17689,8 +17687,8 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
RecordStructure.Insert("char_field" , New Structure("CHAR" , "A"));
|
||||
RecordStructure.Insert("name_field" , New Structure("NAME" , "Vitaly"));
|
||||
RecordStructure.Insert("bytea_field" , New Structure("BYTEA" , Image));
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , 1739207915));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , CurrentDate));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", CurrentDateTZ)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ip_field" , New Structure("INET" , "127.0.0.1"));
|
||||
RecordStructure.Insert("json_field" , New Structure("JSON" , CasualStructure));
|
||||
RecordStructure.Insert("jsonb_field" , New Structure("JSONB" , CasualStructure));
|
||||
@@ -17700,6 +17698,10 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
|
||||
RecordsArray.Add(RecordStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.AddRecords(Table, RecordsArray, True, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17716,15 +17718,16 @@ Procedure PostgreSQL_GetRecords(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);
|
||||
|
||||
// All records without filters
|
||||
|
||||
Table = "testtable";
|
||||
Table = "testtable";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetRecords(Table, , , , , ConnectionString);
|
||||
|
||||
If ValueIsFilled(Result["data"]) Then // SKIP
|
||||
@@ -17786,10 +17789,6 @@ Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -17812,6 +17811,10 @@ Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
OPI_TestDataRetrieval.WriteLog(Count, "UpdateRecords (amount)", "PostgreSQL"); // SKIP
|
||||
Count = Count["data"].Count(); // SKIP
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17840,10 +17843,6 @@ Procedure PostgreSQL_DeleteRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -17868,7 +17867,12 @@ Procedure PostgreSQL_DeleteRecords(FunctionParameters)
|
||||
FilterStructure.Insert("raw" , False);
|
||||
|
||||
Obtaining = OPI_PostgreSQL.GetRecords(Table, , Filters, , , ConnectionString); // SKIP
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
|
||||
// END
|
||||
|
||||
@@ -17896,14 +17900,14 @@ Procedure PostgreSQL_DeleteTable(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteTable(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17929,14 +17933,14 @@ Procedure PostgreSQL_DeleteDatabase(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17985,14 +17989,14 @@ Procedure PostgreSQL_ClearTable(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.ClearTable(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -18015,12 +18019,12 @@ Procedure PostgreSQL_DisableAllDatabaseConnections(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "testbase1";
|
||||
|
||||
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
// 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
|
||||
|
@@ -1053,6 +1053,15 @@ Function UNIXTime(Val Date) Export
|
||||
|
||||
EndFunction
|
||||
|
||||
Function DateRFC3339(Val Date, Val Offset = "Z") Export
|
||||
|
||||
OPI_TypeConversion.GetDate(Date);
|
||||
OPI_TypeConversion.GetLine(Offset);
|
||||
|
||||
Return XMLString(Date) + Offset;
|
||||
|
||||
EndFunction
|
||||
|
||||
Function ConvertDataWithSizeRetrieval(Data, Val MinimumStreamSize = 0) Export
|
||||
|
||||
Size = 0;
|
||||
|
@@ -101,7 +101,7 @@ Function CloseConnection(Val Connection) Export
|
||||
EndFunction
|
||||
|
||||
// Is connector !NOCLI
|
||||
// Checks that the value is an object of a SQLite AddIn
|
||||
// Checks that the value is an object of a PostgreSQL AddIn
|
||||
//
|
||||
// Parameters:
|
||||
// Value - Arbitrary - Value to check - value
|
||||
@@ -508,7 +508,7 @@ Function ProcessParameters(Val Parameters)
|
||||
|
||||
EndFunction
|
||||
|
||||
Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
Function ProcessParameter(CurrentParameter)
|
||||
|
||||
CurrentType = TypeOf(CurrentParameter);
|
||||
|
||||
@@ -520,6 +520,10 @@ Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
|
||||
CurrentParameter = String(CurrentParameter);
|
||||
|
||||
ElsIf CurrentType = Type("Date") Then
|
||||
|
||||
CurrentParameter = OPI_Tools.DateRFC3339(CurrentParameter);
|
||||
|
||||
ElsIf OPI_Tools.CollectionFieldExists(CurrentParameter, "BYTEA") Then
|
||||
|
||||
CurrentParameter = ProcessBlobStructure(CurrentParameter);
|
||||
@@ -538,14 +542,13 @@ Function ProcessParameter(CurrentParameter, Embedded = False)
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
CurrentParameter[ParamElement.Key] = ProcessParameter(CurrentValue, True);
|
||||
CurrentParameter[ParamElement.Key] = ProcessParameter(CurrentValue);
|
||||
|
||||
EndDo;
|
||||
|
||||
Else
|
||||
|
||||
If Not OPI_Tools.IsPrimitiveType(CurrentParameter)
|
||||
And Not CurrentType = Type("Date") Then
|
||||
If Not OPI_Tools.IsPrimitiveType(CurrentParameter) Then
|
||||
OPI_TypeConversion.GetLine(CurrentParameter);
|
||||
EndIf;
|
||||
|
||||
|
@@ -17512,10 +17512,6 @@ Procedure PostgreSQL_CreateDatabase(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
Base = "testbase1";
|
||||
@@ -17523,6 +17519,10 @@ Procedure PostgreSQL_CreateDatabase(FunctionParameters)
|
||||
Deletion = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString); // SKIP
|
||||
OPI_TestDataRetrieval.WriteLog(Deletion, "CreateDatabase (deleting)", "PostgreSQL"); // SKIP
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateDatabase(Base, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17559,10 +17559,6 @@ Procedure PostgreSQL_CreateTable(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";
|
||||
@@ -17594,6 +17590,10 @@ Procedure PostgreSQL_CreateTable(FunctionParameters)
|
||||
ColoumnsStruct.Insert("time_field" , "TIME");
|
||||
ColoumnsStruct.Insert("uuid_field" , "UUID");
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.CreateTable(Table, ColoumnsStruct, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17625,14 +17625,14 @@ Procedure PostgreSQL_GetTableInformation(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetTableInformation(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17656,10 +17656,6 @@ 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";
|
||||
@@ -17669,7 +17665,9 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
CasualStructure = New Structure("key,value", "ItsKey", 10);
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
|
||||
CurrentDate = OPI_Tools.GetCurrentDate();
|
||||
CurrentDateTZ = OPI_Tools.DateRFC3339(CurrentDate, "+05:00");
|
||||
|
||||
RecordStructure = New Structure;
|
||||
RecordStructure.Insert("bool_field" , New Structure("BOOL" , True));
|
||||
@@ -17689,8 +17687,8 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
RecordStructure.Insert("char_field" , New Structure("CHAR" , "A"));
|
||||
RecordStructure.Insert("name_field" , New Structure("NAME" , "Vitaly"));
|
||||
RecordStructure.Insert("bytea_field" , New Structure("BYTEA" , Image));
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , 1739207915));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", 1739207915)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , CurrentDate));
|
||||
RecordStructure.Insert("tswtz_field" , New Structure("TIMESTAMP_WITH_TIME_ZONE", CurrentDateTZ)); // or TIMESTAMP WITH TIME ZONE
|
||||
RecordStructure.Insert("ip_field" , New Structure("INET" , "127.0.0.1"));
|
||||
RecordStructure.Insert("json_field" , New Structure("JSON" , CasualStructure));
|
||||
RecordStructure.Insert("jsonb_field" , New Structure("JSONB" , CasualStructure));
|
||||
@@ -17700,6 +17698,10 @@ Procedure PostgreSQL_AddRecords(FunctionParameters)
|
||||
|
||||
RecordsArray.Add(RecordStructure);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.AddRecords(Table, RecordsArray, True, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17716,15 +17718,16 @@ Procedure PostgreSQL_GetRecords(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);
|
||||
|
||||
// All records without filters
|
||||
|
||||
Table = "testtable";
|
||||
Table = "testtable";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.GetRecords(Table, , , , , ConnectionString);
|
||||
|
||||
If ValueIsFilled(Result["data"]) Then // SKIP
|
||||
@@ -17786,10 +17789,6 @@ Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -17812,6 +17811,10 @@ Procedure PostgreSQL_UpdateRecords(FunctionParameters)
|
||||
OPI_TestDataRetrieval.WriteLog(Count, "UpdateRecords (amount)", "PostgreSQL"); // SKIP
|
||||
Count = Count["data"].Count(); // SKIP
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQl.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17840,10 +17843,6 @@ Procedure PostgreSQL_DeleteRecords(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "test_data";
|
||||
|
||||
// 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 = "test_data";
|
||||
@@ -17868,7 +17867,12 @@ Procedure PostgreSQL_DeleteRecords(FunctionParameters)
|
||||
FilterStructure.Insert("raw" , False);
|
||||
|
||||
Obtaining = OPI_PostgreSQL.GetRecords(Table, , Filters, , , ConnectionString); // SKIP
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteRecords(Table, Filters, ConnectionString);
|
||||
|
||||
// END
|
||||
|
||||
@@ -17896,14 +17900,14 @@ Procedure PostgreSQL_DeleteTable(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.DeleteTable(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17929,14 +17933,14 @@ Procedure PostgreSQL_DeleteDatabase(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "postgres";
|
||||
|
||||
// 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);
|
||||
|
||||
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()
|
||||
Result = OPI_PostgreSQL.DeleteDatabase(Base, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -17985,14 +17989,14 @@ Procedure PostgreSQL_ClearTable(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";
|
||||
|
||||
// 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()
|
||||
Result = OPI_PostgreSQL.ClearTable(Table, ConnectionString);
|
||||
|
||||
// END
|
||||
@@ -18015,12 +18019,12 @@ Procedure PostgreSQL_DisableAllDatabaseConnections(FunctionParameters)
|
||||
Password = FunctionParameters["PG_Password"];
|
||||
Base = "testbase1";
|
||||
|
||||
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
// 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
|
||||
|
@@ -1053,6 +1053,15 @@ Function UNIXTime(Val Date) Export
|
||||
|
||||
EndFunction
|
||||
|
||||
Function DateRFC3339(Val Date, Val Offset = "Z") Export
|
||||
|
||||
OPI_TypeConversion.GetDate(Date);
|
||||
OPI_TypeConversion.GetLine(Offset);
|
||||
|
||||
Return XMLString(Date) + Offset;
|
||||
|
||||
EndFunction
|
||||
|
||||
Function ConvertDataWithSizeRetrieval(Data, Val MinimumStreamSize = 0) Export
|
||||
|
||||
Size = 0;
|
||||
|
6
src/ru/OInt/core/Modules/OPI_PostgreSQL.os
vendored
6
src/ru/OInt/core/Modules/OPI_PostgreSQL.os
vendored
@@ -519,10 +519,10 @@
|
||||
ИначеЕсли ТекущийТип = Тип("УникальныйИдентификатор") Тогда
|
||||
|
||||
ТекущийПараметр = Строка(ТекущийПараметр);
|
||||
|
||||
|
||||
ИначеЕсли ТекущийТип = Тип("Дата") Тогда
|
||||
|
||||
ТекущийПараметр = OPI_Инструменты.ДатаRFC3339(ТекущийПараметр);
|
||||
|
||||
ТекущийПараметр = OPI_Инструменты.ДатаRFC3339(ТекущийПараметр);
|
||||
|
||||
ИначеЕсли OPI_Инструменты.ПолеКоллекцииСуществует(ТекущийПараметр, "BYTEA") Тогда
|
||||
|
||||
|
14
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
14
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
@@ -17665,9 +17665,9 @@
|
||||
OPI_ПреобразованиеТипов.ПолучитьДвоичныеДанные(Картинка); // Картинка - Тип: ДвоичныеДанные
|
||||
|
||||
СлучайнаяСтруктура = Новый Структура("key,value", "ItsKey", 10);
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
СтруктураЗаписи = Новый Структура;
|
||||
СтруктураЗаписи.Вставить("bool_field" , Новый Структура("BOOL" , Истина));
|
||||
@@ -17722,8 +17722,8 @@
|
||||
|
||||
// Все записи без отборов
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
@@ -17732,7 +17732,7 @@
|
||||
|
||||
Если ЗначениеЗаполнено(Результат["data"]) Тогда // SKIP
|
||||
Результат["data"][0]["bytea_field"]["BYTEA"] // SKIP
|
||||
= Лев(Результат["data"][0]["bytea_field"]["BYTEA"], 10) + "..."; // SKIP
|
||||
= Лев(Результат["data"][0]["bytea_field"]["BYTEA"], 10) + "..."; // SKIP
|
||||
КонецЕсли; // SKIP
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьЗаписи", "PostgreSQL"); // SKIP
|
||||
@@ -17867,7 +17867,7 @@
|
||||
СтруктураФильтра.Вставить("raw" , Ложь);
|
||||
|
||||
Получение = OPI_PostgreSQL.ПолучитьЗаписи(Таблица, , Фильтры, , , СтрокаПодключения); // SKIP
|
||||
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
|
@@ -2155,9 +2155,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@@ -1055,11 +1055,11 @@
|
||||
|
||||
Функция ДатаRFC3339(Знач Дата, Знач Смещение = "Z") Экспорт
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьДату(Дата);
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Смещение);
|
||||
|
||||
Возврат XMLСтрока(Дата) + Смещение;
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьДату(Дата);
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Смещение);
|
||||
|
||||
Возврат XMLСтрока(Дата) + Смещение;
|
||||
|
||||
КонецФункции
|
||||
|
||||
Функция ПреобразоватьДанныеСПолучениемРазмера(Данные, Знач МинимальныйРазмерДляПотока = 0) Экспорт
|
||||
|
@@ -519,10 +519,10 @@
|
||||
ИначеЕсли ТекущийТип = Тип("УникальныйИдентификатор") Тогда
|
||||
|
||||
ТекущийПараметр = Строка(ТекущийПараметр);
|
||||
|
||||
|
||||
ИначеЕсли ТекущийТип = Тип("Дата") Тогда
|
||||
|
||||
ТекущийПараметр = OPI_Инструменты.ДатаRFC3339(ТекущийПараметр);
|
||||
|
||||
ТекущийПараметр = OPI_Инструменты.ДатаRFC3339(ТекущийПараметр);
|
||||
|
||||
ИначеЕсли OPI_Инструменты.ПолеКоллекцииСуществует(ТекущийПараметр, "BYTEA") Тогда
|
||||
|
||||
|
@@ -1055,11 +1055,11 @@
|
||||
|
||||
Функция ДатаRFC3339(Знач Дата, Знач Смещение = "Z") Экспорт
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьДату(Дата);
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Смещение);
|
||||
|
||||
Возврат XMLСтрока(Дата) + Смещение;
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьДату(Дата);
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(Смещение);
|
||||
|
||||
Возврат XMLСтрока(Дата) + Смещение;
|
||||
|
||||
КонецФункции
|
||||
|
||||
Функция ПреобразоватьДанныеСПолучениемРазмера(Данные, Знач МинимальныйРазмерДляПотока = 0) Экспорт
|
||||
|
@@ -17665,9 +17665,9 @@
|
||||
OPI_ПреобразованиеТипов.ПолучитьДвоичныеДанные(Картинка); // Картинка - Тип: ДвоичныеДанные
|
||||
|
||||
СлучайнаяСтруктура = Новый Структура("key,value", "ItsKey", 10);
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
ТекущаяДата = OPI_Инструменты.ПолучитьТекущуюДату();
|
||||
ТекущаяДатаЧП = OPI_Инструменты.ДатаRFC3339(ТекущаяДата, "+05:00");
|
||||
|
||||
СтруктураЗаписи = Новый Структура;
|
||||
СтруктураЗаписи.Вставить("bool_field" , Новый Структура("BOOL" , Истина));
|
||||
@@ -17722,8 +17722,8 @@
|
||||
|
||||
// Все записи без отборов
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
Таблица = "testtable";
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
@@ -17732,7 +17732,7 @@
|
||||
|
||||
Если ЗначениеЗаполнено(Результат["data"]) Тогда // SKIP
|
||||
Результат["data"][0]["bytea_field"]["BYTEA"] // SKIP
|
||||
= Лев(Результат["data"][0]["bytea_field"]["BYTEA"], 10) + "..."; // SKIP
|
||||
= Лев(Результат["data"][0]["bytea_field"]["BYTEA"], 10) + "..."; // SKIP
|
||||
КонецЕсли; // SKIP
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьЗаписи", "PostgreSQL"); // SKIP
|
||||
@@ -17867,7 +17867,7 @@
|
||||
СтруктураФильтра.Вставить("raw" , Ложь);
|
||||
|
||||
Получение = OPI_PostgreSQL.ПолучитьЗаписи(Таблица, , Фильтры, , , СтрокаПодключения); // SKIP
|
||||
|
||||
|
||||
// При использовании строки подключения инициализируется новое соединение,
|
||||
// которое будет закрыто после выполнения функции.
|
||||
// В случае выполнения нескольких операций желательно использовать одно соединение,
|
||||
|
Reference in New Issue
Block a user