1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-06-18 05:04:13 +02:00
Files
OpenIntegrations/docs/en/md/SQLite/Table-management/Get-table-information.mdx
T
Vitaly the Alpaca (bot) f06bab8da9 Main build (Jenkins)
2026-05-16 10:53:43 +03:00

140 lines
3.0 KiB
Plaintext
Vendored

---
sidebar_position: 1
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
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';
import Admonition from '@theme/Admonition';
# Get table information
Gets information about the table
<Tabs>
<TabItem value="params" label="Parameters" default>
`Function GetTableInformation(Val Table, Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Table | --table | String | &#x2714; | Table name |
| Connection | --db | String, Arbitrary | &#x2716; | Existing connection or database path |
<div className="return-value-note">
<div className="return-value-note__title">Returns</div>
<div className="return-value-note__value">
Map Of KeyAndValue - Result of query execution
</div>
</div>
</TabItem>
<TabItem value="extended" label={<span>Advanced call{' '}<a href="/docs/Start/Advanced-call" target="_blank" rel="noreferrer" title="About advanced call" onClick={(e) => e.stopPropagation()}>?</a></span>}>
| Parameter | Description |
|---|---|
| addin_mode | Manual selection of external component connection mode (for 1C): Isolated, NotIsolated |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
</TabItem>
</Tabs>
```bsl title="1C:Enterprise/OneScript code example"
Base = "/tmp/vnnmoosn.qqb.sqlite";
Table = "test";
Result = OPI_SQLite.GetTableInformation(Table, Base);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint sqlite GetTableInformation \
--table "test" \
--db "/tmp/cyw3g5s1.luc.sqlite"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint sqlite GetTableInformation ^
--table "test" ^
--db "/tmp/cyw3g5s1.luc.sqlite"
```
</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
}
```