2025-01-08 21:46:13 +03:00
---
2025-06-09 22:06:01 +03:00
sidebar_position: 11
2025-05-05 11:15:20 +03:00
description: Clear table and other functions to work with SQLite in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SQLite]
2025-01-08 21:46:13 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Clear table
Clears the database table
`Function ClearTable(Val Table, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | ✔ | Table name |
| Connection | --db | String, Arbitrary | ✖ | Existing connection or database path |
2025-02-11 14:50:59 +03:00
Returns: Map Of KeyAndValue - Result of query execution
2025-01-08 21:46:13 +03:00
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-09-12 16:37:40 +03:00
Base = "C:\Users\bayse\AppData\Local\Temp\v8_8D28_307.sqlite";
2025-01-08 21:46:13 +03:00
Table = "test";
Result = OPI_SQLite.ClearTable(Table, Base);
```
2025-01-10 12:07:46 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint sqlite ClearTable \
--table "test" \
2025-07-15 23:11:07 +03:00
--db "/tmp/1h5u01yu.rt1.sqlite"
2025-01-10 12:07:46 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint sqlite ClearTable ^
--table "test" ^
2025-07-15 23:11:07 +03:00
--db "/tmp/1h5u01yu.rt1.sqlite"
2025-01-10 12:07:46 +03:00
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": true
}
```