Renders an interactive database table structure viewer showing columns, primary keys, unique keys, and indices with edit, copy, and delete action buttons.
ShowCreateTable — set as ReportType in def_report.
def Render(self, Param1="", Param2="", Param3="") -> str:
The query must return two columns: the table name (column 1) and the SHOW CREATE TABLE DDL output (column 2). The report parses the DDL string to extract column definitions, primary keys, unique keys, and regular indices, then renders them in two side-by-side Bootstrap columns. Left side shows the Columns table; right side shows Primary Keys, Unique Keys, and Indices tables.
CreateColumnsTable(TableName, Heading, Name, DataArr, rowcount)Returns an HTML table of column names and their DDL definitions, with Edit, Copy, and Delete action buttons. Delete is disabled when only one column remains.
CreateIndicesTable(TableName, IndexType, Heading, Name, DataArr)Returns an HTML table of index entries (key name and columns) with a Delete button and an Add button (omitted for Primary Key when one already exists).
Action buttons call JavaScript functions (formmodalF, btn_delTableColumn, btn_copyTableColumn, btn_delTableIndex, btn_delTablePrimary, btn_editTableIndex) expected to be defined in the page context. Remote database connections are supported via self.ComputeDB._Remote.