class StructureController extends AbstractController

Handles table structure logic

Properties

protected Response $response from AbstractController
protected DatabaseInterface $dbi from AbstractController
protected Template $template from AbstractController
protected string $db from AbstractController
protected string $table from AbstractController
protected Table $table_obj
protected string $_url_query
protected bool $_db_is_system_schema
protected bool $_tbl_is_view
protected string $_tbl_storage_engine
protected int $_table_info_num_rows
protected string $_tbl_collation
protected array $_showtable

Methods

__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, string $table, bool $db_is_system_schema, bool $tbl_is_view, string $tbl_storage_engine, int $table_info_num_rows, string $tbl_collation, array $showtable, Relation $relation, Transformations $transformations, CreateAddField $createAddField)

StructureController constructor

void
indexAction(ContainerBuilder $containerBuilder)

Index action

void
moveColumns()

Moves columns in the table's structure based on $_REQUEST

void
displayHtmlForColumnChange(array $selected, string $action, ContainerBuilder $containerBuilder)

Displays HTML for changing one or more columns

void
displayHtmlForPartitionChange()

Displays HTML for partition change

void
updatePartitioning()

Update the table's partitioning based on $_REQUEST

string|null
getMultipleFieldCommandType()

Function to get the type of command for multiple field handling

void
displayTableBrowseForSelectedColumns(string $goto, string $pmaThemeImage)

Function to display table browse for selected columns

boolean
updateColumns()

Update the table's structure based on $_REQUEST

boolean
adjustColumnPrivileges(array $adjust_privileges)

Adjusts the Privileges for all the columns whose names have changed

boolean
columnNeedsAlterTable(integer $i)

Verifies if some elements of a column have changed

string
displayStructure(array $cfgRelation, array $columns_with_unique_index, mixed $url_params, Index|false $primary_index, array $fields, array $columns_with_index)

Displays the table structure ('show table' works correct since 3.23.03)

string
getTableStats()

Get HTML snippet for display table statistics

string
getKeyForTablePrimary()

Gets table primary key

array
getDataForSubmitMult(string $submit_mult, array $selected, string $action, ContainerBuilder $containerBuilder)

Get List of information for Submit Mult

Details

at line 114
__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, string $table, bool $db_is_system_schema, bool $tbl_is_view, string $tbl_storage_engine, int $table_info_num_rows, string $tbl_collation, array $showtable, Relation $relation, Transformations $transformations, CreateAddField $createAddField)

StructureController constructor

Parameters

Response $response Response object
DatabaseInterface $dbi DatabaseInterface object
Template $template Template that should be used (if provided, default one otherwise)
string $db Database name
string $table Table name
bool $db_is_system_schema DB is information_schema
bool $tbl_is_view Table is a view
string $tbl_storage_engine Table storage engine
int $table_info_num_rows Number of rows
string $tbl_collation Table collation
array $showtable Show table info
Relation $relation Relation instance
Transformations $transformations Transformations instance
CreateAddField $createAddField CreateAddField instance

at line 153
void indexAction(ContainerBuilder $containerBuilder)

Index action

Parameters

ContainerBuilder $containerBuilder ContainerBuilder instance

Return Value

void

at line 401
protected void moveColumns()

Moves columns in the table's structure based on $_REQUEST

Return Value

void

at line 528
protected void displayHtmlForColumnChange(array $selected, string $action, ContainerBuilder $containerBuilder)

Displays HTML for changing one or more columns

Parameters

array $selected the selected columns
string $action target script to call
ContainerBuilder $containerBuilder Container builder instance (Used in tbl_columns_definition_form.inc.php)

Return Value

void

at line 581
protected void displayHtmlForPartitionChange()

Displays HTML for partition change

Return Value

void

at line 763
protected void updatePartitioning()

Update the table's partitioning based on $_REQUEST

Return Value

void

at line 795
protected string|null getMultipleFieldCommandType()

Function to get the type of command for multiple field handling

Return Value

string|null

at line 836
protected void displayTableBrowseForSelectedColumns(string $goto, string $pmaThemeImage)

Function to display table browse for selected columns

Parameters

string $goto goto page url
string $pmaThemeImage URI of the pma theme image

Return Value

void

at line 890
protected boolean updateColumns()

Update the table's structure based on $_REQUEST

Return Value

boolean true if error occurred

at line 1142
protected boolean adjustColumnPrivileges(array $adjust_privileges)

Adjusts the Privileges for all the columns whose names have changed

Parameters

array $adjust_privileges assoc array of old col names mapped to new cols

Return Value

boolean boolean whether at least one column privileges adjusted

at line 1188
protected boolean columnNeedsAlterTable(integer $i)

Verifies if some elements of a column have changed

Parameters

integer $i column index in the request

Return Value

boolean true if we need to generate ALTER TABLE

at line 1237
protected string displayStructure(array $cfgRelation, array $columns_with_unique_index, mixed $url_params, Index|false $primary_index, array $fields, array $columns_with_index)

Displays the table structure ('show table' works correct since 3.23.03)

Parameters

array $cfgRelation current relation parameters
array $columns_with_unique_index Columns with unique index
mixed $url_params Contains an associative array with url params
Index|false $primary_index primary index or false if no one exists
array $fields Fields
array $columns_with_index Columns with index

Return Value

string

at line 1408
protected string getTableStats()

Get HTML snippet for display table statistics

Return Value

string

at line 1537
protected string getKeyForTablePrimary()

Gets table primary key

Return Value

string

at line 1565
protected array getDataForSubmitMult(string $submit_mult, array $selected, string $action, ContainerBuilder $containerBuilder)

Get List of information for Submit Mult

Parameters

string $submit_mult mult_submit type
array $selected the selected columns
string $action action type
ContainerBuilder $containerBuilder Container builder instance

Return Value

array