1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-27 21:48:56 +02:00
OpenIntegrations/docs/en/md/SQLite/Orm/Get-table-information.mdx
Vitaly the Alpaca (bot) 02af8cc7d4 Main build (Jenkins)
2025-02-11 14:50:59 +03:00

119 lines
2.1 KiB
Plaintext
Vendored

---
sidebar_position: 1
---
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 |
Returns: Map Of KeyAndValue - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_5571_2fd.sqlite";
Table = "test";
Result = OPI_SQLite.GetTableInformation(Table, Base);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint sqlite GetTableInformation \
--table "test" \
--db "C:\Users\Administrator\AppData\Local\Temp\cfyaxf0knp1.sqlite"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint sqlite GetTableInformation ^
--table "test" ^
--db "C:\Users\Administrator\AppData\Local\Temp\cfyaxf0knp1.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
}
```