Method | Description | |
---|---|---|
findTableNames ( string $schema = '' ) : array | Returns all table names in the database. | |
getDefaultSchema ( ) : string | ||
setDefaultSchema ( $schema ) |
Method | Description | |
---|---|---|
assertIdentifier ( $name ) : string | ||
createNewTableInfo ( $schemaName, $tableName ) : |
||
createTableInfo ( $table ) : |
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 ( $src ) : 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 ) |
protected assertIdentifier ( $name ) : string | ||
return | string | a valid identifier. |
protected createNewTableInfo ( $schemaName, $tableName ) : |
||
return |
protected createTableInfo ( $table ) : |
||
return | table information. |
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. |
return | array | all table names in the database. |
protected getConstraintKeys ( $schemaName, $tableName ) : array | ||
return | array | tuple ($primary, $foreign) |
protected getForeignKeys ( $src ) : array | ||
return | array | foreign relationship table name and keys, null otherwise |
protected getPrimaryKeys ( $src ) : array | ||
return | array | primary key field names. |
protected getSchemaTableName ( $table ) : array | ||
return | array | tuple as ($schemaName,$tableName) |
protected getSequenceName ( $tableInfo, $src ) : string | ||
return | string | serial name if found, null otherwise. |
protected getTableInfoClass ( ) : string | ||
return | string | TDbTableInfo class name. |
protected isForeignKeyColumn ( $columnId, $tableInfo ) : boolean | ||
return | boolean | true if column is a foreign key. |
protected isPrecisionType ( $type ) : boolean | ||
return | boolean | true if column type if "numeric", "interval" or begins with "time". |