PHP Class Prado\Data\Common\Pgsql\TPgsqlMetaData

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

Méthodes protégées

Méthode Description
assertIdentifier ( $name ) : string
createNewTableInfo ( $schemaName, $tableName ) : TPgsqlTableInfo
createTableInfo ( $table ) : TPgsqlTableInfo Get the column definitions for given table.
getConstraintKeys ( $schemaName, $tableName ) : array Gets the primary and foreign key column details for the given table.
getForeignKeys ( $src ) : array Gets foreign relationship constraint keys and table name
getIsView ( $schemaName, $tableName ) : boolean
getPrimaryKeys ( $tableName, $schemaName, $columnIndex ) : array Gets the primary key field names
getSchemaTableName ( $table ) : array
getSequenceName ( $tableInfo, $src ) : string
getTableInfoClass ( ) : string
isForeignKeyColumn ( $columnId, $tableInfo ) : boolean
isPrecisionType ( $type ) : boolean
processColumn ( $tableInfo, $col )

Method Details

assertIdentifier() protected méthode

protected assertIdentifier ( $name ) : string
Résultat string a valid identifier.

createNewTableInfo() protected méthode

protected createNewTableInfo ( $schemaName, $tableName ) : TPgsqlTableInfo
Résultat TPgsqlTableInfo

createTableInfo() protected méthode

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

findTableNames() public méthode

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

getDefaultSchema() public méthode

public getDefaultSchema ( ) : string
Résultat string default schema.

getForeignKeys() protected méthode

Gets foreign relationship constraint keys and table name
protected getForeignKeys ( $src ) : array
Résultat array foreign relationship table name and keys, null otherwise

getIsView() protected méthode

protected getIsView ( $schemaName, $tableName ) : boolean
Résultat boolean true if the table is a view.

getPrimaryKeys() protected méthode

Gets the primary key field names
protected getPrimaryKeys ( $tableName, $schemaName, $columnIndex ) : array
Résultat array primary key field names.

getSchemaTableName() protected méthode

protected getSchemaTableName ( $table ) : array
Résultat array tuple as ($schemaName,$tableName)

getSequenceName() protected méthode

protected getSequenceName ( $tableInfo, $src ) : string
Résultat string serial name if found, null otherwise.

getTableInfoClass() protected méthode

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

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".

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

setDefaultSchema() public méthode

public setDefaultSchema ( $schema )