2025-01-08 21:46:13 +03:00
|
|
|
---
|
|
|
|
sidebar_position: 8
|
|
|
|
---
|
|
|
|
|
|
|
|
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-03-11 21:09:03 +03:00
|
|
|
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_1CE5_34.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-02-19 16:19:57 +03:00
|
|
|
--db "C:\Users\Administrator\AppData\Local\Temp\j1xc4k40xk2.sqlite"
|
2025-01-10 12:07:46 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
|
|
```batch
|
|
|
|
oint sqlite ClearTable ^
|
|
|
|
--table "test" ^
|
2025-02-19 16:19:57 +03:00
|
|
|
--db "C:\Users\Administrator\AppData\Local\Temp\j1xc4k40xk2.sqlite"
|
2025-01-10 12:07:46 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
|
|
{
|
|
|
|
"result": true
|
|
|
|
}
|
|
|
|
```
|