1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-04-28 20:46:05 +02:00
Files
OpenIntegrations/docs/en/examples/PostgreSQL/UpdateRecords.txt
T
Vitaly the Alpaca (bot) a7e68ba04e Main build (Jenkins)
2025-02-14 23:21:49 +03:00

32 lines
1.3 KiB
Plaintext
Vendored

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);