mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-21 21:27:27 +02:00
32 lines
1.3 KiB
Plaintext
Vendored
32 lines
1.3 KiB
Plaintext
Vendored
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
|
|
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
|
|
|
PictureFile = GetTempFileName("png");
|
|
Image.Write(PictureFile); // PictureFile - File to disk
|
|
|
|
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_4102_79.sqlite";
|
|
Table = "test";
|
|
|
|
DataArray = New Array;
|
|
|
|
RowStructure2 = New Structure;
|
|
RowStructure2.Insert("name" , "Vitaly"); // TEXT
|
|
RowStructure2.Insert("age" , 25); // INTEGER
|
|
RowStructure2.Insert("salary" , 1000.12); // REAL
|
|
RowStructure2.Insert("is_active" , True); // BOOL
|
|
RowStructure2.Insert("created_at", OPI_Tools.GetCurrentDate()); // DATETIME
|
|
RowStructure2.Insert("data" , Image); // BLOB
|
|
|
|
RowStrucutre1 = New Structure;
|
|
RowStrucutre1.Insert("name" , "Lesha") ; // TEXT
|
|
RowStrucutre1.Insert("age" , 20); // INTEGER
|
|
RowStrucutre1.Insert("salary" , 200.20) ; // REAL
|
|
RowStrucutre1.Insert("is_active" , False) ; // BOOL
|
|
RowStrucutre1.Insert("created_at", OPI_Tools.GetCurrentDate()); // DATETIME
|
|
RowStrucutre1.Insert("data" , New Structure("blob", PictureFile)); // BLOB
|
|
|
|
DataArray.Add(RowStructure2);
|
|
DataArray.Add(RowStrucutre1);
|
|
|
|
Result = OPI_SQLite.AddRecords(Table, DataArray, , Base);
|