2026-01-23 09:09:53 +03:00
|
|
|
Image = "https://hut.openintegrations.dev/test_data/picture.jpg";
|
2025-01-02 15:49:55 +03:00
|
|
|
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
2025-01-02 01:42:27 +03:00
|
|
|
|
2025-01-02 15:49:55 +03:00
|
|
|
PictureFile = GetTempFileName("png");
|
|
|
|
|
Image.Write(PictureFile); // PictureFile - File to disk
|
|
|
|
|
|
2026-01-23 09:09:53 +03:00
|
|
|
Base = "/tmp/vnnmoosn.qqb.sqlite";
|
2025-01-02 15:49:55 +03:00
|
|
|
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
|
2025-09-04 15:33:26 +03:00
|
|
|
RowStructure2.Insert("data" , New Structure("blob", Image)); // BLOB
|
2025-01-02 15:49:55 +03:00
|
|
|
|
2026-01-23 16:16:46 +03:00
|
|
|
RowStructure1 = New Structure;
|
|
|
|
|
RowStructure1.Insert("name" , "Lesha"); // TEXT
|
|
|
|
|
RowStructure1.Insert("age" , 20); // INTEGER
|
|
|
|
|
RowStructure1.Insert("salary" , 200.20); // REAL
|
|
|
|
|
RowStructure1.Insert("is_active" , False); // BOOL
|
|
|
|
|
RowStructure1.Insert("created_at", OPI_Tools.GetCurrentDate()); // DATETIME
|
|
|
|
|
RowStructure1.Insert("data" , New Structure("blob", PictureFile)); // BLOB
|
2025-01-02 15:49:55 +03:00
|
|
|
|
|
|
|
|
DataArray.Add(RowStructure2);
|
2026-01-23 16:16:46 +03:00
|
|
|
DataArray.Add(RowStructure1);
|
2025-01-02 15:49:55 +03:00
|
|
|
|
2026-01-23 09:09:53 +03:00
|
|
|
Result = OPI_SQLite.AddRecords(Table, DataArray, , Base);
|