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
Показать файл Открыть проект

Открытые методы

Метод Описание
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