PHP Class 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
Since: 3.1
Inheritance: extends Prado\Data\Common\TDbMetaData
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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 )

Method Details

createNewTableInfo() protected méthode

protected createNewTableInfo ( $table ) : TMysqlTableInfo
Résultat TMysqlTableInfo

createTableInfo() protected méthode

Get the column definitions for given table.
protected createTableInfo ( $table ) : TMysqlTableInfo
Résultat TMysqlTableInfo table information.

findForeignConstraints() protected méthode

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

findTableNames() public méthode

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.
Résultat array all table names in the database.

getConstraintKeys() protected méthode

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

getForeignConstraints() protected méthode

Gets foreign relationship constraint keys and table name
protected getForeignConstraints ( $schemaName, $tableName ) : array
Résultat array foreign relationship table name and keys.

getIsView() protected méthode

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

getSchemaTableName() protected méthode

protected getSchemaTableName ( $table ) : array
Résultat array tuple ($schema,$table), $schema may be null.

getServerVersion() protected méthode

protected getServerVersion ( ) : float
Résultat float server version.

getShowCreateTable() protected méthode

protected getShowCreateTable ( $schemaName, $tableName ) : string
Résultat string SQL command to create the table.

getTableInfoClass() protected méthode

protected getTableInfoClass ( ) : string
Résultat string TDbTableInfo class name.

isEnumSetType() protected méthode

protected isEnumSetType ( $type ) : boolean
Résultat boolean true if column type if "enum" or "set".

isForeignKeyColumn() protected méthode

protected isForeignKeyColumn ( $columnId, $tableInfo ) : boolean
Résultat boolean true if column is a foreign key.

isPrecisionType() protected méthode

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

isValidIdentifier() protected méthode

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

processColumn() protected méthode

protected processColumn ( $tableInfo, $col )

quoteColumnAlias() public méthode

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

quoteColumnName() public méthode

Quotes a column name for use in a query.
public quoteColumnName ( string $name ) : string
$name string column name
Résultat string the properly quoted column name

quoteTableName() public méthode

Quotes a table name for use in a query.
public quoteTableName ( string $name ) : string
$name string table name
Résultat string the properly quoted table name