PHP Class Prado\Data\Common\TDbMetaData

Use the {@link getTableInfo} method to retrieve a table information.
Since: 3.1
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Protected Properties

Свойство Type Description
$delimiterIdentifier array

Méthodes publiques

Méthode Description
__construct ( $conn )
createCommandBuilder ( $tableName = null ) : TDbCommandBuilder Creates a command builder for a given table name.
findTableNames ( string $schema = '' ) : array Returns all table names in the database.
getDbConnection ( ) : TDbConnection
getInstance ( $conn ) : TDbMetaData Obtain database specific TDbMetaData class using the driver name of the database connection.
getTableInfo ( $tableName = null ) : TDbTableInfo Obtains table meta data information for the current connection and given table name.
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
createTableInfo ( $tableName ) : TDbTableInfo This method should be implemented by decendent classes.
getTableInfoClass ( ) : string

Method Details

__construct() public méthode

public __construct ( $conn )

createCommandBuilder() public méthode

Creates a command builder for a given table name.
public createCommandBuilder ( $tableName = null ) : TDbCommandBuilder
Résultat TDbCommandBuilder command builder instance for the given table.

createTableInfo() abstract protected méthode

This method should be implemented by decendent classes.
abstract protected createTableInfo ( $tableName ) : TDbTableInfo
Résultat TDbTableInfo driver dependent create builder.

findTableNames() abstract public méthode

This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.
abstract 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.

getDbConnection() public méthode

public getDbConnection ( ) : TDbConnection
Résultat TDbConnection database connection.

getInstance() public static méthode

Obtain database specific TDbMetaData class using the driver name of the database connection.
public static getInstance ( $conn ) : TDbMetaData
Résultat TDbMetaData database specific TDbMetaData.

getTableInfo() public méthode

Obtains table meta data information for the current connection and given table name.
public getTableInfo ( $tableName = null ) : TDbTableInfo
Résultat TDbTableInfo table information.

getTableInfoClass() protected méthode

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

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

Property Details

$delimiterIdentifier protected_oe static_oe property

protected static array $delimiterIdentifier
Résultat array