Skip to main content

Get table information

Gets information about the table

Function GetTableInformation(Val Table, Val Connection = "") Export

ParameterCLI optionTypeRequiredDescription
Table--tableStringTable name
Connection--dbString, ArbitraryExisting connection or database path

Returns: Structure Of KeyAndValue, String - The result of the execution or SQL query text


1C:Enterprise/OneScript code example
    Base  = "C:\Users\Administrator\AppData\Local\Temp\v8_E607_1d.sqlite";
Table = "test";

Result = OPI_SQLite.GetTableInformation(Table, Base);
    oint sqlite GetTableInformation \
--table "test" \
--db "C:\Users\Administrator\AppData\Local\Temp\3pbdgv5r4nm.sqlite"
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
}