MCPcopy
hub / github.com/coleifer/sqlite-web / table_structure

Function table_structure

sqlite_web/sqlite_web.py:548–562  ·  view source on GitHub ↗
(table)

Source from the content-addressed store, hash-verified

546@app.route('/<table>/')
547@require_table
548def table_structure(table):
549 dataset = get_dataset()
550 ds_table = dataset[table]
551 model_class = ds_table.model_class
552
553 return render_template(
554 'table_structure.html',
555 columns=dataset.get_columns(table),
556 ds_table=ds_table,
557 foreign_keys=dataset.get_foreign_keys(table),
558 indexes=dataset.get_indexes(table),
559 model_class=model_class,
560 table=table,
561 table_sql=dataset.get_table_sql(table),
562 triggers=dataset.get_triggers(table))
563
564def get_request_data():
565 if request.method == 'POST':

Callers

nothing calls this directly

Calls 6

get_datasetFunction · 0.85
get_columnsMethod · 0.80
get_foreign_keysMethod · 0.80
get_indexesMethod · 0.80
get_table_sqlMethod · 0.80
get_triggersMethod · 0.80

Tested by

no test coverage detected