PHP 클래스 Prado\Data\Common\Mysql\TMysqlMetaData

For Mysql version 4.1.x, PHP 5.1.3 or later is required. See http://netevil.org/node.php?nid=795&SC=1
부터: 3.1
상속: extends Prado\Data\Common\TDbMetaData
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
findTableNames ( string $schema = '' ) : array Returns all table names in the database.
quoteColumnAlias ( string $name ) : string Quotes a column alias for use in a query.
quoteColumnName ( string $name ) : string Quotes a column name for use in a query.
quoteTableName ( string $name ) : string Quotes a table name for use in a query.

보호된 메소드들

메소드 설명
createNewTableInfo ( $table ) : TMysqlTableInfo
createTableInfo ( $table ) : TMysqlTableInfo Get the column definitions for given table.
findForeignConstraints ( $schemaName, $tableName ) : array Extract foreign key constraints by extracting the contraints from SHOW CREATE TABLE result.
getConstraintKeys ( $schemaName, $tableName ) : array Gets the primary and foreign key column details for the given table.
getForeignConstraints ( $schemaName, $tableName ) : array Gets foreign relationship constraint keys and table name
getIsView ( $schemaName, $tableName ) : boolean For MySQL version 5.0.1 or later we can use SHOW FULL TABLES http://dev.mysql.com/doc/refman/5.0/en/show-tables.html
getSchemaTableName ( $table ) : array
getServerVersion ( ) : float
getShowCreateTable ( $schemaName, $tableName ) : string
getTableInfoClass ( ) : string
isEnumSetType ( $type ) : boolean
isForeignKeyColumn ( $columnId, $tableInfo ) : boolean
isPrecisionType ( $type ) : boolean
isValidIdentifier ( $name ) http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
processColumn ( $tableInfo, $col )

메소드 상세

createNewTableInfo() 보호된 메소드

protected createNewTableInfo ( $table ) : TMysqlTableInfo
리턴 TMysqlTableInfo

createTableInfo() 보호된 메소드

Get the column definitions for given table.
protected createTableInfo ( $table ) : TMysqlTableInfo
리턴 TMysqlTableInfo table information.

findForeignConstraints() 보호된 메소드

Extract foreign key constraints by extracting the contraints from SHOW CREATE TABLE result.
protected findForeignConstraints ( $schemaName, $tableName ) : array
리턴 array foreign relationship table name and keys.

findTableNames() 공개 메소드

Returns all table names in the database.
public findTableNames ( string $schema = '' ) : array
$schema string the schema of the tables. Defaults to empty string, meaning the current or default schema. If not empty, the returned table names will be prefixed with the schema name.
리턴 array all table names in the database.

getConstraintKeys() 보호된 메소드

Gets the primary and foreign key column details for the given table.
protected getConstraintKeys ( $schemaName, $tableName ) : array
리턴 array tuple ($primary, $foreign)

getForeignConstraints() 보호된 메소드

Gets foreign relationship constraint keys and table name
protected getForeignConstraints ( $schemaName, $tableName ) : array
리턴 array foreign relationship table name and keys.

getIsView() 보호된 메소드

For MySQL version 5.0.1 or ealier, this always return false.
protected getIsView ( $schemaName, $tableName ) : boolean
리턴 boolean true if is view, false otherwise.

getSchemaTableName() 보호된 메소드

protected getSchemaTableName ( $table ) : array
리턴 array tuple ($schema,$table), $schema may be null.

getServerVersion() 보호된 메소드

protected getServerVersion ( ) : float
리턴 float server version.

getShowCreateTable() 보호된 메소드

protected getShowCreateTable ( $schemaName, $tableName ) : string
리턴 string SQL command to create the table.

getTableInfoClass() 보호된 메소드

protected getTableInfoClass ( ) : string
리턴 string TDbTableInfo class name.

isEnumSetType() 보호된 메소드

protected isEnumSetType ( $type ) : boolean
리턴 boolean true if column type if "enum" or "set".

isForeignKeyColumn() 보호된 메소드

protected isForeignKeyColumn ( $columnId, $tableInfo ) : boolean
리턴 boolean true if column is a foreign key.

isPrecisionType() 보호된 메소드

protected isPrecisionType ( $type ) : boolean
리턴 boolean true if column type if "numeric", "interval" or begins with "time".

isValidIdentifier() 보호된 메소드

http://dev.mysql.com/doc/refman/5.0/en/identifiers.html
protected isValidIdentifier ( $name )

processColumn() 보호된 메소드

protected processColumn ( $tableInfo, $col )

quoteColumnAlias() 공개 메소드

Quotes a column alias for use in a query.
public quoteColumnAlias ( string $name ) : string
$name string column alias
리턴 string the properly quoted column alias

quoteColumnName() 공개 메소드

Quotes a column name for use in a query.
public quoteColumnName ( string $name ) : string
$name string column name
리턴 string the properly quoted column name

quoteTableName() 공개 메소드

Quotes a table name for use in a query.
public quoteTableName ( string $name ) : string
$name string table name
리턴 string the properly quoted table name