class StructureController extends AbstractController (View source)

Handles database structure logic

Properties

protected Response $response from  AbstractController
protected DatabaseInterface $dbi from  AbstractController
protected Template $template from  AbstractController
protected string $db from  AbstractController
protected int $numTables
protected int $position
protected bool $dbIsSystemSchema
protected int $totalNumTables
protected array $tables
protected bool $isShowStats

Methods

__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, Relation $relation, Replication $replication, RelationCleanup $relationCleanup, Operations $operations)

No description

void
render(string $template, array $data = [])

No description

void
addScriptFiles(array $files)

No description

void
index()

No description

void
void
handleRealRowCountRequestAction()

Handles request for real row count on database level view page.

void
copyTable()

No description

string
displayTableList()

Displays the list of tables

string
getTrackingIcon(string $table)

Returns the tracking icon if the table is tracked

array
isRowCountApproximated(array $current_table, bool $table_is_view)

Returns whether the row count is approximated

array
getReplicationStatus(string $table)

Returns the replication status of the table.

array
synchronizeFavoriteTables(RecentFavoriteTable $favoriteInstance, string $user, array $favoriteTables)

Synchronize favorite tables

bool
checkFavoriteTable(string $currentTable)

Function to check if a table is already in favorite list.

bool
hasTable(array $db, string $truename)

Find table with truename

array
getStuffForEngineTypeTable(array $current_table, int $sum_size, int $overhead_size)

Get the value set for ENGINE table,

array
getValuesForAriaTable(array $current_table, int $sum_size, int $overhead_size, int $formatted_size, string $unit, int $formatted_overhead, string $overhead_unit)

Get values for ARIA/MARIA tables

array
getValuesForInnodbTable(array $current_table, int $sum_size)

Get values for InnoDB table

void
export()

No description

void
showCreate()

No description

void
copyForm()

No description

void
centralColumnsAdd()

No description

void
centralColumnsMakeConsistent()

No description

void
centralColumnsRemove()

No description

void
addPrefix()

No description

void
changePrefixForm()

No description

void
dropForm()

No description

void
emptyForm()

No description

void
checkTable()

No description

void
analyzeTable()

No description

void
checksumTable()

No description

void
optimizeTable()

No description

void
repairTable()

No description

void
dropTable()

No description

void
emptyTable()

No description

void
addPrefixTable()

No description

void
replacePrefix()

No description

void
copyTableWithPrefix()

No description

Details

__construct(Response $response, DatabaseInterface $dbi, Template $template, string $db, Relation $relation, Replication $replication, RelationCleanup $relationCleanup, Operations $operations)

Parameters

Response $response Response object
DatabaseInterface $dbi DatabaseInterface object
Template $template Template that should be used
string $db Database name
Relation $relation Relation instance
Replication $replication Replication instance
RelationCleanup $relationCleanup RelationCleanup instance.
Operations $operations Operations instance.

protected void render(string $template, array $data = [])

Parameters

string $template Template path name.
array $data Associative array of template variables.

Return Value

void

protected void addScriptFiles(array $files)

Parameters

array $files

Return Value

void

void index()

Return Value

void

void addRemoveFavoriteTablesAction()

Return Value

void

void handleRealRowCountRequestAction()

Handles request for real row count on database level view page.

Return Value

void

void copyTable()

Return Value

void

protected string displayTableList()

Displays the list of tables

Return Value

string HTML

protected string getTrackingIcon(string $table)

Returns the tracking icon if the table is tracked

Parameters

string $table table name

Return Value

string HTML for tracking icon

protected array isRowCountApproximated(array $current_table, bool $table_is_view)

Returns whether the row count is approximated

Parameters

array $current_table array containing details about the table
bool $table_is_view whether the table is a view

Return Value

array

protected array getReplicationStatus(string $table)

Returns the replication status of the table.

Parameters

string $table table name

Return Value

array

protected array synchronizeFavoriteTables(RecentFavoriteTable $favoriteInstance, string $user, array $favoriteTables)

Synchronize favorite tables

Parameters

RecentFavoriteTable $favoriteInstance Instance of this class
string $user The user hash
array $favoriteTables Existing favorites

Return Value

array

protected bool checkFavoriteTable(string $currentTable)

Function to check if a table is already in favorite list.

Parameters

string $currentTable current table

Return Value

bool

protected bool hasTable(array $db, string $truename)

Find table with truename

Parameters

array $db DB to look into
string $truename Table name

Return Value

bool

protected array getStuffForEngineTypeTable(array $current_table, int $sum_size, int $overhead_size)

Get the value set for ENGINE table,

Parameters

array $current_table current table
int $sum_size total table size
int $overhead_size overhead size

Return Value

array

protected array getValuesForAriaTable(array $current_table, int $sum_size, int $overhead_size, int $formatted_size, string $unit, int $formatted_overhead, string $overhead_unit)

Get values for ARIA/MARIA tables

Parameters

array $current_table current table
int $sum_size sum size
int $overhead_size overhead size
int $formatted_size formatted size
string $unit unit
int $formatted_overhead overhead formatted
string $overhead_unit overhead unit

Return Value

array

protected array getValuesForInnodbTable(array $current_table, int $sum_size)

Get values for InnoDB table

Parameters

array $current_table current table
int $sum_size sum size

Return Value

array

void export()

Return Value

void

void showCreate()

Return Value

void

void copyForm()

Return Value

void

void centralColumnsAdd()

Return Value

void

void centralColumnsMakeConsistent()

Return Value

void

void centralColumnsRemove()

Return Value

void

void addPrefix()

Return Value

void

void changePrefixForm()

Return Value

void

void dropForm()

Return Value

void

void emptyForm()

Return Value

void

void checkTable()

Return Value

void

void analyzeTable()

Return Value

void

void checksumTable()

Return Value

void

void optimizeTable()

Return Value

void

void repairTable()

Return Value

void

void dropTable()

Return Value

void

void emptyTable()

Return Value

void

void addPrefixTable()

Return Value

void

void replacePrefix()

Return Value

void

void copyTableWithPrefix()

Return Value

void