class StructureController extends AbstractController (View source)

Handles database structure logic

Properties

protected ResponseRenderer $response 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(ResponseRenderer $response, Template $template, string $db, Relation $relation, Replication $replication, RelationCleanup $relationCleanup, Operations $operations, DatabaseInterface $dbi, FlashMessages $flash)

No description

void
render(string $templatePath, array $templateData = [])

No description

void
addScriptFiles(array $files)

No description

bool
hasDatabase()

No description

void
redirect(string $route, array $params = [])

No description

void
__invoke()

No description

string
displayTableList(array $replicaInfo)

No description

string
getTrackingIcon(string $table)

Returns the tracking icon if the table is tracked

array
isRowCountApproximated(array $currentTable, bool $tableIsView)

Returns whether the row count is approximated

array
getReplicationStatus(array $replicaInfo, string $table)

Returns the replication status of the table.

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 $currentTable, int $sumSize, int $overheadSize)

Get the value set for ENGINE table,

array
getValuesForAriaTable(array $currentTable, int $sumSize, int $overheadSize, int $formattedSize, string $unit, int $formattedOverhead, string $overheadUnit)

Get values for ARIA/MARIA tables

array
getValuesForInnodbTable(array $currentTable, int $sumSize)

Get values for InnoDB table

array
getValuesForMroongaTable(array $currentTable, int $sumSize)

Get values for Mroonga table

Details

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

No description

Parameters

ResponseRenderer $response
Template $template
string $db
Relation $relation
Replication $replication
RelationCleanup $relationCleanup
Operations $operations
DatabaseInterface $dbi
FlashMessages $flash

protected void render(string $templatePath, array $templateData = [])

No description

Parameters

string $templatePath
array $templateData

Return Value

void

protected void addScriptFiles(array $files)

No description

Parameters

array $files

Return Value

void

protected bool hasDatabase()

No description

Return Value

bool

protected void redirect(string $route, array $params = [])

No description

Parameters

string $route
array $params

Return Value

void

void __invoke()

No description

Return Value

void

protected string displayTableList(array $replicaInfo)

No description

Parameters

array $replicaInfo

Return Value

string

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 $currentTable, bool $tableIsView)

Returns whether the row count is approximated

Parameters

array $currentTable

array containing details about the table

bool $tableIsView

whether the table is a view

Return Value

array

protected array getReplicationStatus(array $replicaInfo, string $table)

Returns the replication status of the table.

Parameters

array $replicaInfo
string $table

table name

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 $currentTable, int $sumSize, int $overheadSize)

internal  param bool $table_is_view whether table is view or not
 

Get the value set for ENGINE table,

Parameters

array $currentTable

current table

int $sumSize

total table size

int $overheadSize

overhead size

Return Value

array

protected array getValuesForAriaTable(array $currentTable, int $sumSize, int $overheadSize, int $formattedSize, string $unit, int $formattedOverhead, string $overheadUnit)

Get values for ARIA/MARIA tables

Parameters

array $currentTable

current table

int $sumSize

sum size

int $overheadSize

overhead size

int $formattedSize

formatted size

string $unit

unit

int $formattedOverhead

overhead formatted

string $overheadUnit

overhead unit

Return Value

array

protected array getValuesForInnodbTable(array $currentTable, int $sumSize)

Get values for InnoDB table

Parameters

array $currentTable

current table

int $sumSize

sum size

Return Value

array

protected array getValuesForMroongaTable(array $currentTable, int $sumSize)

Get values for Mroonga table

Parameters

array $currentTable

current table

int $sumSize

sum size

Return Value

array