You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-08-10 22:41:43 +02:00
Main build (Jenkins)
This commit is contained in:
3
docs/en/data/SQLite/GetRecords.json
vendored
Normal file
3
docs/en/data/SQLite/GetRecords.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Base": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_1E64_48.sqlite"
|
||||
}
|
2
docs/en/examples/SQLite/AddRows.txt
vendored
2
docs/en/examples/SQLite/AddRows.txt
vendored
@@ -4,7 +4,7 @@
|
||||
PictureFile = GetTempFileName("png");
|
||||
Image.Write(PictureFile); // PictureFile - File to disk
|
||||
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
DataArray = New Array;
|
||||
|
2
docs/en/examples/SQLite/CreateTable.txt
vendored
2
docs/en/examples/SQLite/CreateTable.txt
vendored
@@ -1,4 +1,4 @@
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
ColoumnsStruct = New Structure;
|
||||
|
32
docs/en/examples/SQLite/GetRecords.txt
vendored
Normal file
32
docs/en/examples/SQLite/GetRecords.txt
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
Fields = New Array;
|
||||
Fields.Add("name");
|
||||
Fields.Add("salary");
|
||||
|
||||
Filters = New Array;
|
||||
|
||||
FilterStructure1 = New Structure;
|
||||
|
||||
FilterStructure1.Insert("field", "name");
|
||||
FilterStructure1.Insert("type" , "=");
|
||||
FilterStructure1.Insert("value", "Vitaly");
|
||||
FilterStructure1.Insert("union", "AND");
|
||||
FilterStructure1.Insert("raw" , False);
|
||||
|
||||
FilterStructure2 = New Structure;
|
||||
|
||||
FilterStructure2.Insert("field", "age");
|
||||
FilterStructure2.Insert("type" , "BETWEEN");
|
||||
FilterStructure2.Insert("value", "20 AND 30");
|
||||
FilterStructure2.Insert("union", "");
|
||||
FilterStructure2.Insert("raw" , True);
|
||||
|
||||
Filters.Add(FilterStructure1);
|
||||
Filters.Add(FilterStructure2);
|
||||
|
||||
Sort = New Structure("created_at", "DESC");
|
||||
Count = 1;
|
||||
|
||||
Result = OPI_SQLite.GetRecords(Table, Fields, Filters, Sort, Count, Base);
|
2
docs/en/md/SQLite/Orm/Add-rows.mdx
vendored
2
docs/en/md/SQLite/Orm/Add-rows.mdx
vendored
@@ -34,7 +34,7 @@ import TabItem from '@theme/TabItem';
|
||||
PictureFile = GetTempFileName("png");
|
||||
Image.Write(PictureFile); // PictureFile - File to disk
|
||||
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
DataArray = New Array;
|
||||
|
2
docs/en/md/SQLite/Orm/Create-table.mdx
vendored
2
docs/en/md/SQLite/Orm/Create-table.mdx
vendored
@@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
ColoumnsStruct = New Structure;
|
||||
|
31
docs/en/md/SQLite/Orm/Get-records.mdx
vendored
31
docs/en/md/SQLite/Orm/Get-records.mdx
vendored
@@ -30,7 +30,38 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Table = "test";
|
||||
|
||||
Fields = New Array;
|
||||
Fields.Add("name");
|
||||
Fields.Add("salary");
|
||||
|
||||
Filters = New Array;
|
||||
|
||||
FilterStructure1 = New Structure;
|
||||
|
||||
FilterStructure1.Insert("field", "name");
|
||||
FilterStructure1.Insert("type" , "=");
|
||||
FilterStructure1.Insert("value", "Vitaly");
|
||||
FilterStructure1.Insert("union", "AND");
|
||||
FilterStructure1.Insert("raw" , False);
|
||||
|
||||
FilterStructure2 = New Structure;
|
||||
|
||||
FilterStructure2.Insert("field", "age");
|
||||
FilterStructure2.Insert("type" , "BETWEEN");
|
||||
FilterStructure2.Insert("value", "20 AND 30");
|
||||
FilterStructure2.Insert("union", "");
|
||||
FilterStructure2.Insert("raw" , True);
|
||||
|
||||
Filters.Add(FilterStructure1);
|
||||
Filters.Add(FilterStructure2);
|
||||
|
||||
Sort = New Structure("created_at", "DESC");
|
||||
Count = 1;
|
||||
|
||||
Result = OPI_SQLite.GetRecords(Table, Fields, Filters, Sort, Count, Base);
|
||||
```
|
||||
|
||||
|
||||
|
3
docs/ru/data/SQLite/ПолучитьЗаписи.json
vendored
Normal file
3
docs/ru/data/SQLite/ПолучитьЗаписи.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"База": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\v8_1E64_48.sqlite"
|
||||
}
|
2
docs/ru/examples/SQLite/ДобавитьЗаписи.txt
vendored
2
docs/ru/examples/SQLite/ДобавитьЗаписи.txt
vendored
@@ -4,7 +4,7 @@
|
||||
ФайлКартинки = ПолучитьИмяВременногоФайла("png");
|
||||
Картинка.Записать(ФайлКартинки); // ФайлКартинки - Файл на диске
|
||||
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
МассивДанных = Новый Массив;
|
||||
|
32
docs/ru/examples/SQLite/ПолучитьЗаписи.txt
vendored
Normal file
32
docs/ru/examples/SQLite/ПолучитьЗаписи.txt
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
Поля = Новый Массив;
|
||||
Поля.Добавить("name");
|
||||
Поля.Добавить("salary");
|
||||
|
||||
Фильтры = Новый Массив;
|
||||
|
||||
СтруктураФильтра1 = Новый Структура;
|
||||
|
||||
СтруктураФильтра1.Вставить("field", "name");
|
||||
СтруктураФильтра1.Вставить("type" , "=");
|
||||
СтруктураФильтра1.Вставить("value", "Vitaly");
|
||||
СтруктураФильтра1.Вставить("union", "AND");
|
||||
СтруктураФильтра1.Вставить("raw" , Ложь);
|
||||
|
||||
СтруктураФильтра2 = Новый Структура;
|
||||
|
||||
СтруктураФильтра2.Вставить("field", "age");
|
||||
СтруктураФильтра2.Вставить("type" , "BETWEEN");
|
||||
СтруктураФильтра2.Вставить("value", "20 AND 30");
|
||||
СтруктураФильтра2.Вставить("union", "");
|
||||
СтруктураФильтра2.Вставить("raw" , Истина);
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра1);
|
||||
Фильтры.Добавить(СтруктураФильтра2);
|
||||
|
||||
Сортировка = Новый Структура("created_at", "DESC");
|
||||
Количество = 1;
|
||||
|
||||
Результат = OPI_SQLite.ПолучитьЗаписи(Таблица, Поля, Фильтры, Сортировка, Количество, База);
|
2
docs/ru/examples/SQLite/СоздатьТаблицу.txt
vendored
2
docs/ru/examples/SQLite/СоздатьТаблицу.txt
vendored
@@ -1,4 +1,4 @@
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
СтруктураКолонок = Новый Структура;
|
||||
|
10
docs/ru/md/SQLite/Orm/Add-rows.mdx
vendored
10
docs/ru/md/SQLite/Orm/Add-rows.mdx
vendored
@@ -34,7 +34,7 @@ import TabItem from '@theme/TabItem';
|
||||
ФайлКартинки = ПолучитьИмяВременногоФайла("png");
|
||||
Картинка.Записать(ФайлКартинки); // ФайлКартинки - Файл на диске
|
||||
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
МассивДанных = Новый Массив;
|
||||
@@ -64,4 +64,10 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"result": true,
|
||||
"rows": 2,
|
||||
"errors": []
|
||||
}
|
||||
```
|
||||
|
8
docs/ru/md/SQLite/Orm/Create-table.mdx
vendored
8
docs/ru/md/SQLite/Orm/Create-table.mdx
vendored
@@ -28,7 +28,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_7CE_32.sqlite";
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
СтруктураКолонок = Новый Структура;
|
||||
@@ -46,4 +46,8 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
31
docs/ru/md/SQLite/Orm/Get-records.mdx
vendored
31
docs/ru/md/SQLite/Orm/Get-records.mdx
vendored
@@ -30,7 +30,38 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
База = "C:\Users\Administrator\AppData\Local\Temp\v8_1E64_48.sqlite";
|
||||
Таблица = "test";
|
||||
|
||||
Поля = Новый Массив;
|
||||
Поля.Добавить("name");
|
||||
Поля.Добавить("salary");
|
||||
|
||||
Фильтры = Новый Массив;
|
||||
|
||||
СтруктураФильтра1 = Новый Структура;
|
||||
|
||||
СтруктураФильтра1.Вставить("field", "name");
|
||||
СтруктураФильтра1.Вставить("type" , "=");
|
||||
СтруктураФильтра1.Вставить("value", "Vitaly");
|
||||
СтруктураФильтра1.Вставить("union", "AND");
|
||||
СтруктураФильтра1.Вставить("raw" , Ложь);
|
||||
|
||||
СтруктураФильтра2 = Новый Структура;
|
||||
|
||||
СтруктураФильтра2.Вставить("field", "age");
|
||||
СтруктураФильтра2.Вставить("type" , "BETWEEN");
|
||||
СтруктураФильтра2.Вставить("value", "20 AND 30");
|
||||
СтруктураФильтра2.Вставить("union", "");
|
||||
СтруктураФильтра2.Вставить("raw" , Истина);
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра1);
|
||||
Фильтры.Добавить(СтруктураФильтра2);
|
||||
|
||||
Сортировка = Новый Структура("created_at", "DESC");
|
||||
Количество = 1;
|
||||
|
||||
Результат = OPI_SQLite.ПолучитьЗаписи(Таблица, Поля, Фильтры, Сортировка, Количество, База);
|
||||
```
|
||||
|
||||
|
||||
|
12230
service/dictionaries/en.json
vendored
12230
service/dictionaries/en.json
vendored
File diff suppressed because it is too large
Load Diff
2
src/en/OInt/core/Modules/OPI_SQLite.os
vendored
2
src/en/OInt/core/Modules/OPI_SQLite.os
vendored
@@ -490,7 +490,7 @@ Procedure FillSorting(Val Scheme, Val Sort)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
OPI_TypeConversion.GetArray(Sort);
|
||||
OPI_TypeConversion.GetCollection(Sort);
|
||||
|
||||
For Each Element In Sort Do
|
||||
|
||||
|
42
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
42
src/en/OInt/tests/Modules/internal/OPI_Tests.os
vendored
@@ -2237,6 +2237,7 @@ Procedure SQLL_ORM() Export
|
||||
|
||||
SQLite_CreateTable(TestParameters);
|
||||
SQLite_AddRows(TestParameters);
|
||||
SQLite_GetRecords(TestParameters);
|
||||
|
||||
Try
|
||||
DeleteFiles(Base);
|
||||
@@ -16308,6 +16309,47 @@ Procedure SQLite_AddRows(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure SQLite_GetRecords(FunctionParameters)
|
||||
|
||||
Base = FunctionParameters["SQLite_DB"];
|
||||
Table = "test";
|
||||
|
||||
Fields = New Array;
|
||||
Fields.Add("name");
|
||||
Fields.Add("salary");
|
||||
|
||||
Filters = New Array;
|
||||
|
||||
FilterStructure1 = New Structure;
|
||||
|
||||
FilterStructure1.Insert("field", "name");
|
||||
FilterStructure1.Insert("type" , "=");
|
||||
FilterStructure1.Insert("value", "Vitaly");
|
||||
FilterStructure1.Insert("union", "AND");
|
||||
FilterStructure1.Insert("raw" , False);
|
||||
|
||||
FilterStructure2 = New Structure;
|
||||
|
||||
FilterStructure2.Insert("field", "age");
|
||||
FilterStructure2.Insert("type" , "BETWEEN");
|
||||
FilterStructure2.Insert("value", "20 AND 30");
|
||||
FilterStructure2.Insert("union", "");
|
||||
FilterStructure2.Insert("raw" , True);
|
||||
|
||||
Filters.Add(FilterStructure1);
|
||||
Filters.Add(FilterStructure2);
|
||||
|
||||
Sort = New Structure("created_at", "DESC");
|
||||
Count = 1;
|
||||
|
||||
Result = OPI_SQLite.GetRecords(Table, Fields, Filters, Sort, Count, Base);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecords", "SQLite");
|
||||
OPI_TestDataRetrieval.Check_SQLiteSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
|
8
src/en/OInt/tools/Modules/OPI_SQLQueries.os
vendored
8
src/en/OInt/tools/Modules/OPI_SQLQueries.os
vendored
@@ -180,7 +180,7 @@ Procedure AddSorting(Scheme, Val Field, Val Type) Export
|
||||
OPI_TypeConversion.GetLine(Field);
|
||||
OPI_TypeConversion.GetLine(Type);
|
||||
|
||||
Scheme["sort"].Add(New Structure("field,type", Field, Type));
|
||||
Scheme["order"].Add(New Structure("field,type", Field, Type));
|
||||
|
||||
EndProcedure
|
||||
|
||||
@@ -286,7 +286,7 @@ Function FormTextSelect(Val Scheme)
|
||||
|
||||
OptionsBlock = ForSelectOptionsText(Filters, Sort, Count);
|
||||
|
||||
TextSQL = StrTemplate(SQLTemplate, Table, Fields, OptionsBlock);
|
||||
TextSQL = StrTemplate(SQLTemplate, StrConcat(Fields, ", "), Table, OptionsBlock);
|
||||
|
||||
Return TextSQL;
|
||||
|
||||
@@ -430,7 +430,9 @@ Function FormSortingText(Val Sort)
|
||||
SortArray = New Array;
|
||||
|
||||
For Each Element In Sort Do
|
||||
SortArray.Add(Element.Key + " " + Element.Value);
|
||||
|
||||
SortArray.Add(Element["field"] + " " + Element["type"]);
|
||||
|
||||
EndDo;
|
||||
|
||||
SortingText = StrTemplate(SortingText, StrConcat(SortArray, ", "));
|
||||
|
@@ -180,7 +180,7 @@ Procedure AddSorting(Scheme, Val Field, Val Type) Export
|
||||
OPI_TypeConversion.GetLine(Field);
|
||||
OPI_TypeConversion.GetLine(Type);
|
||||
|
||||
Scheme["sort"].Add(New Structure("field,type", Field, Type));
|
||||
Scheme["order"].Add(New Structure("field,type", Field, Type));
|
||||
|
||||
EndProcedure
|
||||
|
||||
@@ -286,7 +286,7 @@ Function FormTextSelect(Val Scheme)
|
||||
|
||||
OptionsBlock = ForSelectOptionsText(Filters, Sort, Count);
|
||||
|
||||
TextSQL = StrTemplate(SQLTemplate, Table, Fields, OptionsBlock);
|
||||
TextSQL = StrTemplate(SQLTemplate, StrConcat(Fields, ", "), Table, OptionsBlock);
|
||||
|
||||
Return TextSQL;
|
||||
|
||||
@@ -430,7 +430,9 @@ Function FormSortingText(Val Sort)
|
||||
SortArray = New Array;
|
||||
|
||||
For Each Element In Sort Do
|
||||
SortArray.Add(Element.Key + " " + Element.Value);
|
||||
|
||||
SortArray.Add(Element["field"] + " " + Element["type"]);
|
||||
|
||||
EndDo;
|
||||
|
||||
SortingText = StrTemplate(SortingText, StrConcat(SortArray, ", "));
|
||||
|
@@ -490,7 +490,7 @@ Procedure FillSorting(Val Scheme, Val Sort)
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
OPI_TypeConversion.GetArray(Sort);
|
||||
OPI_TypeConversion.GetCollection(Sort);
|
||||
|
||||
For Each Element In Sort Do
|
||||
|
||||
|
@@ -2237,6 +2237,7 @@ Procedure SQLL_ORM() Export
|
||||
|
||||
SQLite_CreateTable(TestParameters);
|
||||
SQLite_AddRows(TestParameters);
|
||||
SQLite_GetRecords(TestParameters);
|
||||
|
||||
Try
|
||||
DeleteFiles(Base);
|
||||
@@ -16308,6 +16309,47 @@ Procedure SQLite_AddRows(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure SQLite_GetRecords(FunctionParameters)
|
||||
|
||||
Base = FunctionParameters["SQLite_DB"];
|
||||
Table = "test";
|
||||
|
||||
Fields = New Array;
|
||||
Fields.Add("name");
|
||||
Fields.Add("salary");
|
||||
|
||||
Filters = New Array;
|
||||
|
||||
FilterStructure1 = New Structure;
|
||||
|
||||
FilterStructure1.Insert("field", "name");
|
||||
FilterStructure1.Insert("type" , "=");
|
||||
FilterStructure1.Insert("value", "Vitaly");
|
||||
FilterStructure1.Insert("union", "AND");
|
||||
FilterStructure1.Insert("raw" , False);
|
||||
|
||||
FilterStructure2 = New Structure;
|
||||
|
||||
FilterStructure2.Insert("field", "age");
|
||||
FilterStructure2.Insert("type" , "BETWEEN");
|
||||
FilterStructure2.Insert("value", "20 AND 30");
|
||||
FilterStructure2.Insert("union", "");
|
||||
FilterStructure2.Insert("raw" , True);
|
||||
|
||||
Filters.Add(FilterStructure1);
|
||||
Filters.Add(FilterStructure2);
|
||||
|
||||
Sort = New Structure("created_at", "DESC");
|
||||
Count = 1;
|
||||
|
||||
Result = OPI_SQLite.GetRecords(Table, Fields, Filters, Sort, Count, Base);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetRecords", "SQLite");
|
||||
OPI_TestDataRetrieval.Check_SQLiteSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
|
18
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
18
src/ru/OInt/tests/Modules/internal/OPI_Тесты.os
vendored
@@ -16310,16 +16310,16 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура SQLite_ПолучитьЗаписи(ПараметрыФункции)
|
||||
|
||||
|
||||
База = ПараметрыФункции["SQLite_DB"];
|
||||
Таблица = "test";
|
||||
|
||||
|
||||
Поля = Новый Массив;
|
||||
Поля.Добавить("name");
|
||||
Поля.Добавить("salary");
|
||||
|
||||
|
||||
Фильтры = Новый Массив;
|
||||
|
||||
|
||||
СтруктураФильтра1 = Новый Структура;
|
||||
|
||||
СтруктураФильтра1.Вставить("field", "name");
|
||||
@@ -16327,7 +16327,7 @@
|
||||
СтруктураФильтра1.Вставить("value", "Vitaly");
|
||||
СтруктураФильтра1.Вставить("union", "AND");
|
||||
СтруктураФильтра1.Вставить("raw" , Ложь);
|
||||
|
||||
|
||||
СтруктураФильтра2 = Новый Структура;
|
||||
|
||||
СтруктураФильтра2.Вставить("field", "age");
|
||||
@@ -16335,20 +16335,20 @@
|
||||
СтруктураФильтра2.Вставить("value", "20 AND 30");
|
||||
СтруктураФильтра2.Вставить("union", "");
|
||||
СтруктураФильтра2.Вставить("raw" , Истина);
|
||||
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра1);
|
||||
Фильтры.Добавить(СтруктураФильтра2);
|
||||
|
||||
|
||||
Сортировка = Новый Структура("created_at", "DESC");
|
||||
Количество = 1;
|
||||
|
||||
|
||||
Результат = OPI_SQLite.ПолучитьЗаписи(Таблица, Поля, Фильтры, Сортировка, Количество, База);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьЗаписи", "SQLite");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_SQLiteУспех(Результат);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
4
src/ru/OInt/tools/Modules/OPI_ЗапросыSQL.os
vendored
4
src/ru/OInt/tools/Modules/OPI_ЗапросыSQL.os
vendored
@@ -430,9 +430,9 @@
|
||||
МассивСортировки = Новый Массив;
|
||||
|
||||
Для Каждого Элемент Из Сортировка Цикл
|
||||
|
||||
|
||||
МассивСортировки.Добавить(Элемент["field"] + " " + Элемент["type"]);
|
||||
|
||||
|
||||
КонецЦикла;
|
||||
|
||||
ТекстСортировки = СтрШаблон(ТекстСортировки, СтрСоединить(МассивСортировки, ", "));
|
||||
|
@@ -2111,9 +2111,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ЗапросыSQL.os
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ЗапросыSQL.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@@ -430,9 +430,9 @@
|
||||
МассивСортировки = Новый Массив;
|
||||
|
||||
Для Каждого Элемент Из Сортировка Цикл
|
||||
|
||||
|
||||
МассивСортировки.Добавить(Элемент["field"] + " " + Элемент["type"]);
|
||||
|
||||
|
||||
КонецЦикла;
|
||||
|
||||
ТекстСортировки = СтрШаблон(ТекстСортировки, СтрСоединить(МассивСортировки, ", "));
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@@ -16310,16 +16310,16 @@
|
||||
КонецПроцедуры
|
||||
|
||||
Процедура SQLite_ПолучитьЗаписи(ПараметрыФункции)
|
||||
|
||||
|
||||
База = ПараметрыФункции["SQLite_DB"];
|
||||
Таблица = "test";
|
||||
|
||||
|
||||
Поля = Новый Массив;
|
||||
Поля.Добавить("name");
|
||||
Поля.Добавить("salary");
|
||||
|
||||
|
||||
Фильтры = Новый Массив;
|
||||
|
||||
|
||||
СтруктураФильтра1 = Новый Структура;
|
||||
|
||||
СтруктураФильтра1.Вставить("field", "name");
|
||||
@@ -16327,7 +16327,7 @@
|
||||
СтруктураФильтра1.Вставить("value", "Vitaly");
|
||||
СтруктураФильтра1.Вставить("union", "AND");
|
||||
СтруктураФильтра1.Вставить("raw" , Ложь);
|
||||
|
||||
|
||||
СтруктураФильтра2 = Новый Структура;
|
||||
|
||||
СтруктураФильтра2.Вставить("field", "age");
|
||||
@@ -16335,20 +16335,20 @@
|
||||
СтруктураФильтра2.Вставить("value", "20 AND 30");
|
||||
СтруктураФильтра2.Вставить("union", "");
|
||||
СтруктураФильтра2.Вставить("raw" , Истина);
|
||||
|
||||
|
||||
Фильтры.Добавить(СтруктураФильтра1);
|
||||
Фильтры.Добавить(СтруктураФильтра2);
|
||||
|
||||
|
||||
Сортировка = Новый Структура("created_at", "DESC");
|
||||
Количество = 1;
|
||||
|
||||
|
||||
Результат = OPI_SQLite.ПолучитьЗаписи(Таблица, Поля, Фильтры, Сортировка, Количество, База);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьЗаписи", "SQLite");
|
||||
OPI_ПолучениеДанныхТестов.Проверка_SQLiteУспех(Результат);
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
Reference in New Issue
Block a user