class Operations (View source)

Set of functions with the operations section in phpMyAdmin

Methods

__construct(DatabaseInterface $dbi, Relation $relation)

No description

void
runProcedureAndFunctionDefinitions(string $db)

Run the Procedure definitions and function definitions

void
createDbBeforeCopy()

Create database before copy

array
getViewsAndCreateSqlViewStandIn(array $tables_full, ExportSql $export_sql_plugin, string $db)

Get views as an array and create SQL view stand-in

array
copyTables(array $tables_full, bool $move, string $db)

Get sql query for copy/rename table and boolean for whether copy/rename or not

void
runEventDefinitionsForDb(string $db)

Run the EVENT definition for selected database

void
handleTheViews(array $views, bool $move, string $db)

Handle the views, return the boolean value whether table rename/copy or not

void
adjustPrivilegesMoveDb(string $oldDb, string $newname)

Adjust the privileges after Renaming the db

void
adjustPrivilegesCopyDb(string $oldDb, string $newname)

Adjust the privileges after Copying the db

void
createAllAccumulatedConstraints(array $sqlConstratints)

Create all accumulated constraints

void
duplicateBookmarks(bool $_error, string $db)

Duplicate the bookmarks for the db (done once for each db)

array
getPossibleRowFormat()

Get array of possible row formats

array
getMaintenanceActions(Table $tableObject)

No description

array
array
getForeignersForReferentialIntegrityCheck(array $urlParams, bool $hasRelationFeature)

No description

array
getQueryAndResultForReorderingTable()

Reorder table based on request params

array
getTableAltersArray(Table $pma_table, string $pack_keys, string $checksum, string $page_checksum, string $delay_key_write, string $row_format, string $newTblStorageEngine, string $transactional, string $tbl_collation)

Get table alters array

array
getWarningMessagesArray()

Get warning messages array

array
getQueryAndResultForPartition()

Get SQL query and result after ran this SQL query for a partition operation has been requested by the user

void
adjustPrivilegesRenameOrMoveTable(string $oldDb, string $oldTable, string $newDb, string $newTable)

Adjust the privileges after renaming/moving a table

void
adjustPrivilegesCopyTable(string $oldDb, string $oldTable, string $newDb, string $newTable)

Adjust the privileges after copying a table

void
changeAllColumnsCollation(string $db, string $table, string $tbl_collation)

Change all collations and character sets of all columns in table

moveOrCopyTable(string $db, string $table)

Move or copy a table

Details

__construct(DatabaseInterface $dbi, Relation $relation)

Parameters

DatabaseInterface $dbi DatabaseInterface object
Relation $relation Relation object

void runProcedureAndFunctionDefinitions(string $db)

Run the Procedure definitions and function definitions

to avoid selecting alternatively the current and new db we would need to modify the CREATE definitions to qualify the db name

Parameters

string $db database name

Return Value

void

void createDbBeforeCopy()

Create database before copy

Return Value

void

array getViewsAndCreateSqlViewStandIn(array $tables_full, ExportSql $export_sql_plugin, string $db)

Get views as an array and create SQL view stand-in

Parameters

array $tables_full array of all tables in given db or dbs
ExportSql $export_sql_plugin export plugin instance
string $db database name

Return Value

array

array copyTables(array $tables_full, bool $move, string $db)

Get sql query for copy/rename table and boolean for whether copy/rename or not

Parameters

array $tables_full array of all tables in given db or dbs
bool $move whether database name is empty or not
string $db database name

Return Value

array SQL queries for the constraints

void runEventDefinitionsForDb(string $db)

Run the EVENT definition for selected database

to avoid selecting alternatively the current and new db we would need to modify the CREATE definitions to qualify the db name

Parameters

string $db database name

Return Value

void

void handleTheViews(array $views, bool $move, string $db)

Handle the views, return the boolean value whether table rename/copy or not

Parameters

array $views views as an array
bool $move whether database name is empty or not
string $db database name

Return Value

void

void adjustPrivilegesMoveDb(string $oldDb, string $newname)

Adjust the privileges after Renaming the db

Parameters

string $oldDb Database name before renaming
string $newname New Database name requested

Return Value

void

void adjustPrivilegesCopyDb(string $oldDb, string $newname)

Adjust the privileges after Copying the db

Parameters

string $oldDb Database name before copying
string $newname New Database name requested

Return Value

void

void createAllAccumulatedConstraints(array $sqlConstratints)

Create all accumulated constraints

Parameters

array $sqlConstratints array of sql constraints for the database

Return Value

void

void duplicateBookmarks(bool $_error, string $db)

Duplicate the bookmarks for the db (done once for each db)

Parameters

bool $_error whether table rename/copy or not
string $db database name

Return Value

void

array getPossibleRowFormat()

Get array of possible row formats

Return Value

array

array getMaintenanceActions(Table $tableObject)

Parameters

Table $tableObject Table object

Return Value

array

array getPartitionMaintenanceChoices()

Return Value

array

array getForeignersForReferentialIntegrityCheck(array $urlParams, bool $hasRelationFeature)

Parameters

array $urlParams Array of url parameters.
bool $hasRelationFeature If relation feature is enabled.

Return Value

array

array getQueryAndResultForReorderingTable()

Reorder table based on request params

Return Value

array SQL query and result

array getTableAltersArray(Table $pma_table, string $pack_keys, string $checksum, string $page_checksum, string $delay_key_write, string $row_format, string $newTblStorageEngine, string $transactional, string $tbl_collation)

Get table alters array

Parameters

Table $pma_table The Table object
string $pack_keys pack keys
string $checksum value of checksum
string $page_checksum value of page checksum
string $delay_key_write delay key write
string $row_format row format
string $newTblStorageEngine table storage engine
string $transactional value of transactional
string $tbl_collation collation of the table

Return Value

array

array getWarningMessagesArray()

Get warning messages array

Return Value

array

array getQueryAndResultForPartition()

Get SQL query and result after ran this SQL query for a partition operation has been requested by the user

Return Value

array $sql_query, $result

void adjustPrivilegesRenameOrMoveTable(string $oldDb, string $oldTable, string $newDb, string $newTable)

Adjust the privileges after renaming/moving a table

Parameters

string $oldDb Database name before table renaming/moving table
string $oldTable Table name before table renaming/moving table
string $newDb Database name after table renaming/ moving table
string $newTable Table name after table renaming/moving table

Return Value

void

void adjustPrivilegesCopyTable(string $oldDb, string $oldTable, string $newDb, string $newTable)

Adjust the privileges after copying a table

Parameters

string $oldDb Database name before table copying
string $oldTable Table name before table copying
string $newDb Database name after table copying
string $newTable Table name after table copying

Return Value

void

void changeAllColumnsCollation(string $db, string $table, string $tbl_collation)

Change all collations and character sets of all columns in table

Parameters

string $db Database name
string $table Table name
string $tbl_collation Collation Name

Return Value

void

Message moveOrCopyTable(string $db, string $table)

Move or copy a table

Parameters

string $db current database name
string $table current table name

Return Value

Message