mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
fea73680d7
Also, put the "added" lines in the request schemas for new commands: this doesn't do anything (yet?) but it keeps `make schema-added-check` happy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2.4 KiB
2.4 KiB
lightning-listsqlschemas -- Command to example lightning-sql schemas
SYNOPSIS
listsqlschemas [table]
DESCRIPTION
This allows you to examine the schemas at runtime; while they are fully documented for the current release in lightning-sql(7), as fields are added or deprecated, you can use this command to determine what fields are present.
If table is given, only that table is in the resulting list, otherwise all tables are listed.
EXAMPLE JSON REQUEST
{
"id": 82,
"method": "listsqlschemas",
"params": {
"table": "offers"
}
}
EXAMPLE JSON RESPONSE
{
"schemas": [
{
"tablename": "offers",
"columns": [
{
"name": "offer_id",
"type": "BLOB"
},
{
"name": "active",
"type": "INTEGER"
},
{
"name": "single_use",
"type": "INTEGER"
},
{
"name": "bolt12",
"type": "TEXT"
},
{
"name": "bolt12_unsigned",
"type": "TEXT"
},
{
"name": "used",
"type": "INTEGER"
},
{
"name": "label",
"type": "TEXT"
}
],
"indices": [
[
"offer_id"
]
]
}
]
}
RETURN VALUE
On success, an object containing schemas is returned. It is an array of objects, where each object contains:
- tablename (string): the name of the table
- columns (array of objects): the columns, in database order:
- name (string): the name of the column
- type (string): the SQL type of the column (one of "INTEGER", "BLOB", "TEXT", "REAL")
- indices (array of arrays, optional): Any index we created to speed lookups:
- The columns for this index:
- The column name
- The columns for this index:
AUTHOR
Rusty Russell <rusty@rustcorp.com.au> is mainly responsible.
SEE ALSO
lightning-sql(7).
RESOURCES
Main web site: https://github.com/ElementsProject/lightning comment: # ( SHA256STAMP:29ce2ff3f7cab8a4a90d09fa02fa8176008413272d46c0fe7faa6216f11bb2c6)