2025-01-07 12:27:20 +03:00
---
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Get table information 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-07 12:27:20 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get table information
Gets information about the table
`Function GetTableInformation(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-07 12:27:20 +03:00
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-05-21 08:49:49 +03:00
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_CAAE_321.sqlite";
2025-01-07 12:27:20 +03:00
Table = "test";
Result = OPI_SQLite.GetTableInformation(Table, Base);
```
2025-01-10 12:07:46 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint sqlite GetTableInformation \
--table "test" \
2025-05-01 20:09:27 +03:00
--db "C:\Users\Administrator\AppData\Local\Temp\l5hrbo1dxen.sqlite"
2025-01-10 12:07:46 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint sqlite GetTableInformation ^
--table "test" ^
2025-05-01 20:09:27 +03:00
--db "C:\Users\Administrator\AppData\Local\Temp\l5hrbo1dxen.sqlite"
2025-01-10 12:07:46 +03:00
```
</TabItem>
</Tabs>
```json title="Result"
{
"data": [
{
"cid": 0,
"dflt_value": null,
"name": "id",
"notnull": 0,
"pk": 1,
"type": "INTEGER"
},
{
"cid": 1,
"dflt_value": null,
"name": "name",
"notnull": 0,
"pk": 0,
"type": "TEXT"
},
{
"cid": 2,
"dflt_value": null,
"name": "age",
"notnull": 0,
"pk": 0,
"type": "INTEGER"
},
{
"cid": 3,
"dflt_value": null,
"name": "salary",
"notnull": 0,
"pk": 0,
"type": "REAL"
},
{
"cid": 4,
"dflt_value": null,
"name": "is_active",
"notnull": 0,
"pk": 0,
"type": "BOOLEAN"
},
{
"cid": 5,
"dflt_value": null,
"name": "created_at",
"notnull": 0,
"pk": 0,
"type": "DATETIME"
},
{
"cid": 6,
"dflt_value": null,
"name": "data",
"notnull": 0,
"pk": 0,
"type": "BLOB"
}
],
"result": true
}
```