|
Class TMysqlMetaData
-
TComponent
-
TDbMetaData
-
TMysqlMetaData
Methods summary
protected
string
|
#
getTableInfoClass( )
Returns
string TDbTableInfo class name.
Overrides
|
public
string
|
#
quoteTableName( string $name )
Quotes a table name for use in a query.
Quotes a table name for use in a query.
Parameters
- $name
string $name table name
Returns
string the properly quoted table name
Overrides
|
public
string
|
#
quoteColumnName( string $name )
Quotes a column name for use in a query.
Quotes a column name for use in a query.
Parameters
- $name
string $name column name
Returns
string the properly quoted column name
Overrides
|
public
string
|
#
quoteColumnAlias( string $name )
Quotes a column alias for use in a query.
Quotes a column alias for use in a query.
Parameters
- $name
string $name column alias
Returns
string the properly quoted column alias
Overrides
|
protected
TMysqlTableInfo
|
#
createTableInfo( string $table )
Get the column definitions for given table.
Get the column definitions for given table.
Parameters
Returns
|
protected
float
|
#
getServerVersion( )
Returns
float server version.
|
protected
|
|
protected
boolean
|
#
isPrecisionType( mixed $type )
Returns
boolean true if column type if "numeric", "interval" or begins with "time".
|
protected
boolean
|
#
isEnumSetType( mixed $type )
Returns
boolean true if column type if "enum" or "set".
|
protected
array
|
#
getSchemaTableName( string $table )
Parameters
- $table
string table name, may be quoted with back-ticks and may contain database name.
Returns
array tuple ($schema,$table), $schema may be null.
Throws
TDbException
when table name contains invalid identifier bytes.
|
protected
|
#
isValidIdentifier( string $name )
|
protected
TMysqlTableInfo
|
#
createNewTableInfo( string $table )
Parameters
- $table
string table schema name
Returns
|
protected
boolean
|
#
getIsView( string $schemaName, string $tableName )
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
For MySQL version 5.0.1 or ealier, this always return false.
Parameters
- $schemaName
string database name, null to use default connection database.
- $tableName
string table or view name.
Returns
boolean true if is view, false otherwise.
Throws
|
protected
array
|
#
getConstraintKeys( string $schemaName, string $tableName )
Gets the primary and foreign key column details for the given table.
Gets the primary and foreign key column details for the given table.
Parameters
- $schemaName
string schema name
- $tableName
string table name.
Returns
array tuple ($primary, $foreign)
|
protected
array
|
#
getForeignConstraints( string $schemaName, string $tableName )
Gets foreign relationship constraint keys and table name
Gets foreign relationship constraint keys and table name
Parameters
- $schemaName
string database name
- $tableName
string table name
Returns
array foreign relationship table name and keys.
|
protected
string
|
#
getShowCreateTable( string $schemaName, string $tableName )
Parameters
- $schemaName
string database name
- $tableName
string table name
Returns
string SQL command to create the table.
Throws
|
protected
array
|
#
findForeignConstraints( string $schemaName, string $tableName )
Extract foreign key constraints by extracting the contraints from SHOW CREATE
TABLE result.
Extract foreign key constraints by extracting the contraints from SHOW CREATE
TABLE result.
Parameters
- $schemaName
string database name
- $tableName
string table name
Returns
array foreign relationship table name and keys.
|
protected
boolean
|
#
isForeignKeyColumn( string $columnId, TPgsqlTableInfo $tableInfo )
Parameters
Returns
boolean true if column is a foreign key.
|
public
array
|
#
findTableNames( string $schema = '' )
Returns all table names in the database.
Returns all table names in the database.
Parameters
- $schema
string $schema 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.
Returns
array all table names in the database.
|
Methods inherited from TComponent
__call(),
__destruct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
addParsedObject(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
|