PHP Class Prado\Data\Common\Mssql\TMssqlMetaData

Since: 3.1
Inheritance: extends Prado\Data\Common\TDbMetaData
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
findTableNames ( string $schema = 'dbo' ) : 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.

Protected Methods

Method Description
createNewTableInfo ( $col ) : TMssqlTableInfo
createTableInfo ( $table ) : TMssqlTableInfo Get the column definitions for given table.
getCatalogSchemaTableName ( $table ) : array
getConstraintKeys ( $col ) : array Gets the primary and foreign key column details for the given table.
getForeignConstraints ( $col ) : array Gets foreign relationship constraint keys and table name
getTableInfoClass ( ) : string
isForeignKeyColumn ( $columnId, $tableInfo ) : boolean
processColumn ( $tableInfo, $col )

Method Details

createNewTableInfo() protected method

protected createNewTableInfo ( $col ) : TMssqlTableInfo
return TMssqlTableInfo

createTableInfo() protected method

Get the column definitions for given table.
protected createTableInfo ( $table ) : TMssqlTableInfo
return TMssqlTableInfo table information.

findTableNames() public method

Returns all table names in the database.
public findTableNames ( string $schema = 'dbo' ) : 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.
return array all table names in the database.

getCatalogSchemaTableName() protected method

protected getCatalogSchemaTableName ( $table ) : array
return array tuple($catalogName,$schemaName,$tableName)

getConstraintKeys() protected method

Gets the primary and foreign key column details for the given table.
protected getConstraintKeys ( $col ) : array
return array tuple ($primary, $foreign)

getForeignConstraints() protected method

Gets foreign relationship constraint keys and table name
protected getForeignConstraints ( $col ) : array
return array foreign relationship table name and keys.

getTableInfoClass() protected method

protected getTableInfoClass ( ) : string
return string TDbTableInfo class name.

isForeignKeyColumn() protected method

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

processColumn() protected method

protected processColumn ( $tableInfo, $col )

quoteColumnAlias() public method

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

quoteColumnName() public method

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

quoteTableName() public method

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