1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-27 21:48:56 +02:00
Vitaly the Alpaca (bot) 02af8cc7d4 Main build (Jenkins)
2025-02-11 14:50:59 +03:00

28 lines
1.6 KiB
Plaintext
Vendored

Address = "93.125.42.204";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
RecordStructure = New Structure;
RecordStructure.Insert("bool_field" , New Structure("BOOL" , True));
RecordStructure.Insert("char_field" , New Structure("OLDCHAR" , 1));
RecordStructure.Insert("smallint_field", New Structure("SMALLINT" , 5));
RecordStructure.Insert("int_field" , New Structure("INT" , 100));
RecordStructure.Insert("oid_field" , New Structure("OID" , 24576));
RecordStructure.Insert("bigint_field" , New Structure("BIGINT" , 9999999));
RecordStructure.Insert("real_field" , New Structure("REAL" , 15.2));
RecordStructure.Insert("dp_field" , New Structure("DOUBLE_PRECISION", 1.0000000000000002));
RecordStructure.Insert("text_field" , New Structure("TEXT" , "Some text"));
RecordStructure.Insert("bytea_field" , New Structure("BYTEA" , Image));
RecordStructure.Insert("ts_field" , New Structure("TIMESTAMP" , 1739207915));
RecordStructure.Insert("ip_field" , New Structure("INET" , "127.0.0.1"));
Result = OPI_PostgreSQL.AddRecords(Table, RecordStructure, False, ConnectionString);