Class TPgsqlMetaData
TPgsqlMetaData loads PostgreSQL database table and column information.
Method Summary |
protected
string
|
|
protected
TPgsqlTableInfo
|
|
protected
TPgsqlTableInfo
|
Get the column definitions for given table.
|
protected
array
|
Gets the primary and foreign key column details for the given table.
|
string
|
|
protected
array
|
Gets foreign relationship constraint keys and table name
|
protected
boolean
|
getIsView
( string $schemaName, string $tableName)
|
protected
array
|
getPrimaryKeys
( string $tableName, mixed $schemaName, mixed $columnIndex)
Gets the primary key field names
|
protected
array
|
|
protected
string
|
|
protected
string
|
|
protected
boolean
|
|
protected
boolean
|
|
protected
void
|
|
void
|
|
Methods Inherited From TComponent |
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
Method Details |
assertIdentifier
protected string assertIdentifier |
(string $name ) |
Input |
string | $name | table name, schema name or column name. |
Output |
string
| a valid identifier. |
Exception |
throws | TDbException when table name contains a double quote ("). |
|
createNewTableInfo
protected TPgsqlTableInfo createNewTableInfo |
(string $schemaName , string $tableName ) |
Input |
string | $schemaName | table schema name |
string | $tableName | table name. |
Output |
Exception |
|
createTableInfo
Get the column definitions for given table.
Input |
string | $table | table name. |
Output |
TPgsqlTableInfo
| table information. |
Exception |
|
getConstraintKeys
protected array getConstraintKeys |
(string $schemaName , string $tableName ) |
Gets the primary and foreign key column details for the given table.
Input |
string | $schemaName | schema name |
string | $tableName | table name. |
Output |
array
| tuple ($primary, $foreign) |
Exception |
|
getDefaultSchema
public string getDefaultSchema |
() |
Output |
string
| default schema. |
Exception |
|
getForeignKeys
protected array getForeignKeys |
(string $src ) |
Gets foreign relationship constraint keys and table name
Input |
string | $src | pgsql foreign key definition |
Output |
array
| foreign relationship table name and keys, null otherwise |
Exception |
|
getIsView
protected boolean getIsView |
(string $schemaName , string $tableName ) |
Input |
string | $schemaName | table schema name |
string | $tableName | table name. |
Output |
boolean
| true if the table is a view. |
Exception |
|
getPrimaryKeys
protected array getPrimaryKeys |
(string $tableName , mixed $schemaName , mixed $columnIndex ) |
Gets the primary key field names
Input |
string | $tableName | pgsql primary key definition |
mixed | $schemaName | |
mixed | $columnIndex | |
Output |
array
| primary key field names. |
Exception |
|
getSchemaTableName
protected array getSchemaTableName |
(string $table ) |
Input |
string | $table | table name with optional schema name prefix, uses default schema name prefix is not provided. |
Output |
array
| tuple as ($schemaName,$tableName) |
Exception |
|
getSequenceName
protected string getSequenceName |
(mixed $tableInfo , mixed $src ) |
Input |
mixed | $tableInfo | |
mixed | $src | |
Output |
string
| serial name if found, null otherwise. |
Exception |
|
getTableInfoClass
protected string getTableInfoClass |
() |
Output |
string
| TDbTableInfo class name. |
Exception |
|
isForeignKeyColumn
protected boolean isForeignKeyColumn |
(string $columnId , TPgsqlTableInfo $tableInfo ) |
Input |
string | $columnId | column name. |
TPgsqlTableInfo | $tableInfo | table information. |
Output |
boolean
| true if column is a foreign key. |
Exception |
|
isPrecisionType
protected boolean isPrecisionType |
(mixed $type ) |
Input |
mixed | $type | |
Output |
boolean
| true if column type if "numeric", "interval" or begins with "time". |
Exception |
|
processColumn
Input |
TPgsqlTableInfo | $tableInfo | table information. |
array | $col | column information. |
Output |
Exception |
|
setDefaultSchema
public void setDefaultSchema |
(string $schema ) |
Input |
string | $schema | default schema. |
Output |
Exception |
|
|