1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/SQLite/Orm/Delete-records.mdx
Vitaly the Alpaca (bot) 799e301711 Main build (Jenkins)
2025-05-05 09:49:19 +03:00

82 lines
2.2 KiB
Plaintext
Vendored

---
sidebar_position: 6
description: Deletes records from the tableСтраницы
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SQLite]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Delete records
Deletes records from the table
`Function DeleteRecords(Val Table, Val Filters = "", Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | ✔ | Table name |
| Filters | --filter | Array of Structure | ✖ | Filters array. See GetRecordsFilterStrucutre |
| Connection | --db | String, Arbitrary | ✖ | Existing connection or database path |
Returns: Map Of KeyAndValue - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_436F_151.sqlite";
Table = "test";
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "name");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", "Vitaly A.");
FilterStructure.Insert("union", "AND");
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
Result = OPI_SQLite.DeleteRecords(Table, FilterStructure, Base);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
# JSON data can also be passed as a path to a .json file
oint sqlite DeleteRecords \
--table "test" \
--filter "{'field':'name','type':'=','value':'Vitaly A.','union':'AND','raw':false}" \
--db "C:\Users\Administrator\AppData\Local\Temp\l5hrbo1dxen.sqlite"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
:: JSON data can also be passed as a path to a .json file
oint sqlite DeleteRecords ^
--table "test" ^
--filter "{'field':'name','type':'=','value':'Vitaly A.','union':'AND','raw':false}" ^
--db "C:\Users\Administrator\AppData\Local\Temp\l5hrbo1dxen.sqlite"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": true
}
```