프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$engine | engine (innodb, myisam, bdb, ...) | ||
$errors | errors occurred | ||
$messages | messages | ||
$type | type (view, base table, system view) | ||
$uiprefs | UI preferences |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_db_name | database name | ||
$_dbi | |||
$_name | table name |
메소드 | 설명 | |
---|---|---|
__construct ( string $table_name, string $db_name, |
Constructor | |
__toString ( ) : string | returns table name | |
checkIfMinRecordsExist ( integer $min_records ) : boolean | Checks if the number of records in a table is at least equal to $min_records | |
countRecords ( boolean $force_exact = false ) : mixed | Counts and returns (or displays) the number of records in a table | |
duplicateInfo ( string $work, string $pma_table, array $get_fields, array $where_fields, array $new_fields ) : integer | boolean | Inserts existing entries in a PMA_* table by reading a value from an old entry | |
generateAlter ( string $oldcol, string $newcol, string $type, string $length, string $attribute, string $collation, boolean | string $null, string $default_type, string $default_value, string $extra, string $comment, string $virtuality, string $expression, string $move_to ) : string | Generates column specification for ALTER syntax | |
generateFieldSpec ( string $name, string $type, string $length = '', string $attribute = '', string $collation = '', boolean | string $null = false, string $default_type = 'USER_DEFINED', string $default_value = '', string $extra = '', string $comment = '', string $virtuality = '', string $expression = '', string $move_to = '' ) : string | generates column specification for ALTER or CREATE TABLE syntax | |
getColumnGenerationExpression ( string $column = null ) : array | boolean | Returns the generation expression for virtual columns | |
getColumns ( boolean $backquoted = true, boolean $fullName = true ) : array | Get all columns | |
getColumnsMeta ( ) : mixed | Get meta info for fields in table | |
getColumnsWithIndex ( integer $types ) : array | Get columns with indexes | |
getDbName ( boolean $backquoted = false ) : string | returns database name for this table | |
getFullName ( boolean $backquoted = false ) : string | returns full name for table, including database name | |
getIndex ( string $index ) : |
Get index with index name | |
getIndexedColumns ( boolean $backquoted = true, boolean $fullName = true ) : array | Get all indexed columns | |
getLastError ( ) : string | return the last error | |
getLastMessage ( ) : string | return the last message | |
getName ( boolean $backquoted = false ) : string | returns table name | |
getNameAndTypeOfTheColumns ( ) : array | Function to get the name and type of the columns of a table | |
getNonGeneratedColumns ( boolean $backquoted = true ) : array | Get non-generated columns in table | |
getRealRowCountTable ( ) : number | Returns the real row count for a table | |
getReservedColumnNames ( ) : array | Get all column names which are MySQL reserved words | |
getSqlQueryForIndexCreateOrEdit ( |
Function to get the sql query for index creation or edit | |
getStatusInfo ( string $info = null, boolean $force_read = false, boolean $disable_error = false ) : mixed | Returns full table status info, or specific if $info provided this info is collected from information_schema | |
getUiProp ( string $property ) : mixed | Get a property from UI preferences. | |
getUniqueColumns ( boolean $backquoted = true, boolean $fullName = true ) : array | Get all unique columns | |
isEngine ( $engine ) : boolean | Checks the storage engine used to create table | |
isMerge ( ) : boolean | Checks if this is a merge table | |
isUpdatableView ( ) : boolean | Returns whether the table is actually an updatable view | |
isValidName ( string $table_name, boolean $is_backquoted = false ) : boolean | checks if given name is a valid table name, currently if not empty, trailing spaces, '.', '/' and '\' | |
isView ( ) : boolean | returns whether the table is actually a view | |
moveCopy ( string $source_db, string $source_table, string $target_db, string $target_table, string $what, boolean $move, string $mode ) : boolean | Copies or renames table | |
removeUiProp ( string $property ) : true | |
Remove a property from UI preferences. | |
rename ( string $new_name, string $new_db = null ) : boolean | renames table | |
setUiProp ( string $property, mixed $value, string $table_create_time = null ) : boolean | |
Set a property from UI preferences. | |
showCreate ( ) : mixed | Returns the CREATE statement for this table | |
updateDisplayField ( string $disp, string $display_field, array $cfgRelation ) : boolean | Function to handle update for display field | |
updateForeignKeys ( array $destination_foreign_db, array $multi_edit_columns_name, array $destination_foreign_table, array $destination_foreign_column, array $options_array, string $table, array $existrel_foreign ) : array | Function to handle foreign key updates | |
updateInternalRelations ( array $multi_edit_columns_name, array $destination_db, array $destination_table, array $destination_column, array $cfgRelation, array | null $existrel ) : boolean | Function to get update query for updating internal relations |
메소드 | 설명 | |
---|---|---|
getUiPrefsFromDb ( ) : array | Return UI preferences for this table from phpMyAdmin database. | |
loadUiPrefs ( ) : void | Loads the UI preferences for this table. | |
saveUiPrefsToDb ( ) : true | |
Save this table's UI preferences into phpMyAdmin database. |
메소드 | 설명 | |
---|---|---|
_formatColumns ( array $indexed, boolean $backquoted, boolean $fullName ) : array | Formats lists of columns | |
_getSQLToCreateForeignKey ( string $table, array $field, string $foreignDb, string $foreignTable, array $foreignField, string $name = null, string $onDelete = null, string $onUpdate = null ) : string | Returns the SQL query for foreign key constraint creation |
public __construct ( string $table_name, string $db_name, |
||
$table_name | string | table name |
$db_name | string | database name |
$dbi | database interface for the table |
public checkIfMinRecordsExist ( integer $min_records ) : boolean | ||
$min_records | integer | Number of records to check for in a table |
리턴 | boolean | True, if at least $min_records exist, False otherwise. |
public countRecords ( boolean $force_exact = false ) : mixed | ||
$force_exact | boolean | whether to force an exact count |
리턴 | mixed | the number of records if "retain" param is true, otherwise true |
public static duplicateInfo ( string $work, string $pma_table, array $get_fields, array $where_fields, array $new_fields ) : integer | boolean | ||
$work | string | The array index, which Relation feature to check ('relwork', 'commwork', ...) |
$pma_table | string | The array index, which PMA-table to update ('bookmark', 'relation', ...) |
$get_fields | array | Which fields will be SELECT'ed from the old entry |
$where_fields | array | Which fields will be used for the WHERE query (array('FIELDNAME' => 'FIELDVALUE')) |
$new_fields | array | Which fields will be used as new VALUES. These are the important keys which differ from the old entry (array('FIELDNAME' => 'NEW FIELDVALUE')) |
리턴 | integer | boolean |
public static generateAlter ( string $oldcol, string $newcol, string $type, string $length, string $attribute, string $collation, boolean | string $null, string $default_type, string $default_value, string $extra, string $comment, string $virtuality, string $expression, string $move_to ) : string | ||
$oldcol | string | old column name |
$newcol | string | new column name |
$type | string | type ('INT', 'VARCHAR', 'BIT', ...) |
$length | string | length ('2', '5,2', '', ...) |
$attribute | string | attribute |
$collation | string | collation |
$null | boolean | string | with 'NULL' or 'NOT NULL' |
$default_type | string | whether default is CURRENT_TIMESTAMP, NULL, NONE, USER_DEFINED |
$default_value | string | default value for USER_DEFINED default type |
$extra | string | 'AUTO_INCREMENT' |
$comment | string | field comment |
$virtuality | string | virtuality of the column |
$expression | string | expression for the virtual column |
$move_to | string | new position for column |
리턴 | string | field specification |
static public generateFieldSpec ( string $name, string $type, string $length = '', string $attribute = '', string $collation = '', boolean | string $null = false, string $default_type = 'USER_DEFINED', string $default_value = '', string $extra = '', string $comment = '', string $virtuality = '', string $expression = '', string $move_to = '' ) : string | ||
$name | string | name |
$type | string | type ('INT', 'VARCHAR', 'BIT', ...) |
$length | string | length ('2', '5,2', '', ...) |
$attribute | string | attribute |
$collation | string | collation |
$null | boolean | string | with 'NULL' or 'NOT NULL' |
$default_type | string | whether default is CURRENT_TIMESTAMP, NULL, NONE, USER_DEFINED |
$default_value | string | default value for USER_DEFINED default type |
$extra | string | 'AUTO_INCREMENT' |
$comment | string | field comment |
$virtuality | string | virtuality of the column |
$expression | string | expression for the virtual column |
$move_to | string | new position for column |
리턴 | string | field specification |
public getColumnsMeta ( ) : mixed | ||
리턴 | mixed |
public getColumnsWithIndex ( integer $types ) : array | ||
$types | integer | types bitmask |
리턴 | array | an array of columns |
public getFullName ( boolean $backquoted = false ) : string | ||
$backquoted | boolean | whether to quote name with backticks `` |
리턴 | string |
public getLastError ( ) : string | ||
리턴 | string | the last error |
public getLastMessage ( ) : string | ||
리턴 | string | the last message |
public getNameAndTypeOfTheColumns ( ) : array | ||
리턴 | array |
public getNonGeneratedColumns ( boolean $backquoted = true ) : array | ||
$backquoted | boolean | whether to quote name with backticks `` |
리턴 | array |
public getRealRowCountTable ( ) : number | ||
리턴 | number |
public getReservedColumnNames ( ) : array | ||
리턴 | array |
public getSqlQueryForIndexCreateOrEdit ( |
||
$index | current index | |
리턴 | string |
protected getUiPrefsFromDb ( ) : array | ||
리턴 | array |
public isUpdatableView ( ) : boolean | ||
리턴 | boolean | whether the given is an updatable view |
protected loadUiPrefs ( ) : void | ||
리턴 | void |
public static moveCopy ( string $source_db, string $source_table, string $target_db, string $target_table, string $what, boolean $move, string $mode ) : boolean | ||
$source_db | string | source database |
$source_table | string | source table |
$target_db | string | target database |
$target_table | string | target table |
$what | string | what to be moved or copied (data, dataonly) |
$move | boolean | whether to move |
$mode | string | mode |
리턴 | boolean | true if success, false otherwise |
public removeUiProp ( string $property ) : true | |
||
$property | string | the property |
리턴 | true | |
protected saveUiPrefsToDb ( ) : true | |
||
리턴 | true | |
public showCreate ( ) : mixed | ||
리턴 | mixed |
public updateForeignKeys ( array $destination_foreign_db, array $multi_edit_columns_name, array $destination_foreign_table, array $destination_foreign_column, array $options_array, string $table, array $existrel_foreign ) : array | ||
$destination_foreign_db | array | destination foreign database |
$multi_edit_columns_name | array | multi edit column names |
$destination_foreign_table | array | destination foreign table |
$destination_foreign_column | array | destination foreign column |
$options_array | array | options array |
$table | string | current table |
$existrel_foreign | array | db, table, column |
리턴 | array |
public updateInternalRelations ( array $multi_edit_columns_name, array $destination_db, array $destination_table, array $destination_column, array $cfgRelation, array | null $existrel ) : boolean | ||
$multi_edit_columns_name | array | multi edit column names |
$destination_db | array | destination tables |
$destination_table | array | destination tables |
$destination_column | array | destination columns |
$cfgRelation | array | configuration relation |
$existrel | array | null | db, table, column |
리턴 | boolean |