PHP 클래스 PMA\libraries\Index

파일 보기 프로젝트 열기: phpmyadmin/phpmyadmin 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor
addColumn ( array $params ) : void Add column to index
addColumns ( array $columns ) : void Adds a list of columns to the index
findDuplicates ( string $table, string $schema ) : string Function to check over array of indexes and look for common problems
generateIndexChoiceSelector ( boolean $edit_table ) : string Returns HTML for the index choice selector
generateIndexTypeSelector ( ) : string Returns HTML for the index type selector
getChoice ( ) : string Returns index choice (PRIMARY, UNIQUE, INDEX, SPATIAL, FULLTEXT)
getColumnCount ( ) : integer Returns the number of columns of the index
getColumns ( ) : PMA\libraries\IndexColumn[] Returns the columns of the index
getComment ( ) : string Returns the index comment
getComments ( ) : string Returns concatenated remarks and comment
getCompareData ( ) : array Gets the properties in an array for comparison purposes
getFromTable ( string $table, string $schema ) : Index[] returns an array with all indexes from the given table
getFromTableByChoice ( string $table, string $schema, integer $choices = 31 ) : Index[] Returns an array with all indexes from the given table of the requested types
getHtmlForIndexes ( string $table, string $schema, boolean $print_mode = false ) : string Show index data
getIndexChoices ( ) : string[] Return a list of all index choices
getIndexTypes ( ) : string[] Returns a lit of all index types
getKeyBlockSize ( ) : number Return the key block size
getName ( ) : string Returns the name of the index
getNonUnique ( ) : integer Returns integer 0 if the index cannot contain duplicates, 1 if it can
getPacked ( ) : string Returns how the index is packed
getParser ( ) : string Return the parser
getPrimary ( string $table, string $schema ) : mixed return primary if set, false otherwise
getRemarks ( ) : string Returns index remarks
getType ( ) : string Returns index type (BTREE, HASH, RTREE)
hasColumn ( string $column ) : boolean Returns true if $column indexed in this index
isPacked ( ) : string Returns 'No' if the index is not packed, how the index is packed if packed
isUnique ( boolean $as_text = false ) : mixed Returns whether the index is a 'Unique' index
set ( array $params ) : void Sets index details
setName ( string $name ) : void Sets the name of the index
singleton ( string $schema, string $table, string $index_name = '' ) : Index Creates(if not already created) and returns the corresponding Index object

비공개 메소드들

메소드 설명
_loadIndexes ( string $table, string $schema ) : boolean Load index data for table

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $params = [] )
$params array parameters

addColumn() 공개 메소드

Add column to index
public addColumn ( array $params ) : void
$params array column params
리턴 void

addColumns() 공개 메소드

Adds a list of columns to the index
public addColumns ( array $columns ) : void
$columns array array containing details about the columns
리턴 void

findDuplicates() 공개 정적인 메소드

Function to check over array of indexes and look for common problems
public static findDuplicates ( string $table, string $schema ) : string
$table string table name
$schema string schema name
리턴 string Output HTML

generateIndexChoiceSelector() 공개 메소드

Returns HTML for the index choice selector
public generateIndexChoiceSelector ( boolean $edit_table ) : string
$edit_table boolean whether this is table editing
리턴 string HTML for the index choice selector

generateIndexTypeSelector() 공개 메소드

Returns HTML for the index type selector
public generateIndexTypeSelector ( ) : string
리턴 string HTML for the index type selector

getChoice() 공개 메소드

Returns index choice (PRIMARY, UNIQUE, INDEX, SPATIAL, FULLTEXT)
public getChoice ( ) : string
리턴 string index choice

getColumnCount() 공개 메소드

Returns the number of columns of the index
public getColumnCount ( ) : integer
리턴 integer the number of the columns

getColumns() 공개 메소드

Returns the columns of the index
public getColumns ( ) : PMA\libraries\IndexColumn[]
리턴 PMA\libraries\IndexColumn[] the columns of the index

getComment() 공개 메소드

Returns the index comment
public getComment ( ) : string
리턴 string index comment

getComments() 공개 메소드

Returns concatenated remarks and comment
public getComments ( ) : string
리턴 string concatenated remarks and comment

getCompareData() 공개 메소드

Gets the properties in an array for comparison purposes
public getCompareData ( ) : array
리턴 array an array containing the properties of the index

getFromTable() 공개 정적인 메소드

returns an array with all indexes from the given table
public static getFromTable ( string $table, string $schema ) : Index[]
$table string table
$schema string schema
리턴 Index[] array of indexes

getFromTableByChoice() 공개 정적인 메소드

Returns an array with all indexes from the given table of the requested types
public static getFromTableByChoice ( string $table, string $schema, integer $choices = 31 ) : Index[]
$table string table
$schema string schema
$choices integer choices
리턴 Index[] array of indexes

getHtmlForIndexes() 공개 정적인 메소드

Show index data
public static getHtmlForIndexes ( string $table, string $schema, boolean $print_mode = false ) : string
$table string The table name
$schema string The schema name
$print_mode boolean Whether the output is for the print mode
리턴 string HTML for showing index

getIndexChoices() 공개 정적인 메소드

Return a list of all index choices
public static getIndexChoices ( ) : string[]
리턴 string[] index choices

getIndexTypes() 공개 정적인 메소드

Returns a lit of all index types
public static getIndexTypes ( ) : string[]
리턴 string[] index types

getKeyBlockSize() 공개 메소드

Return the key block size
public getKeyBlockSize ( ) : number
리턴 number

getName() 공개 메소드

Returns the name of the index
public getName ( ) : string
리턴 string the name of the index

getNonUnique() 공개 메소드

Returns integer 0 if the index cannot contain duplicates, 1 if it can
public getNonUnique ( ) : integer
리턴 integer 0 if the index cannot contain duplicates, 1 if it can

getPacked() 공개 메소드

Returns how the index is packed
public getPacked ( ) : string
리턴 string how the index is packed

getParser() 공개 메소드

Return the parser
public getParser ( ) : string
리턴 string

getPrimary() 공개 정적인 메소드

return primary if set, false otherwise
public static getPrimary ( string $table, string $schema ) : mixed
$table string table
$schema string schema
리턴 mixed primary index or false if no one exists

getRemarks() 공개 메소드

Returns index remarks
public getRemarks ( ) : string
리턴 string index remarks

getType() 공개 메소드

Returns index type (BTREE, HASH, RTREE)
public getType ( ) : string
리턴 string index type

hasColumn() 공개 메소드

Returns true if $column indexed in this index
public hasColumn ( string $column ) : boolean
$column string the column
리턴 boolean true if $column indexed in this index

isPacked() 공개 메소드

Returns 'No' if the index is not packed, how the index is packed if packed
public isPacked ( ) : string
리턴 string

isUnique() 공개 메소드

Returns whether the index is a 'Unique' index
public isUnique ( boolean $as_text = false ) : mixed
$as_text boolean whether to output should be in text
리턴 mixed whether the index is a 'Unique' index

set() 공개 메소드

Sets index details
public set ( array $params ) : void
$params array index details
리턴 void

setName() 공개 메소드

Sets the name of the index
public setName ( string $name ) : void
$name string index name
리턴 void

singleton() 공개 정적인 메소드

Creates(if not already created) and returns the corresponding Index object
public static singleton ( string $schema, string $table, string $index_name = '' ) : Index
$schema string database name
$table string table name
$index_name string index name
리턴 Index corresponding Index object