Structure
class Structure extends Object implements IStructure
Cached reflection of database structure.
Properties
protected Connection | $connection | ||
protected Cache | $cache | ||
protected array | $structure | ||
protected bool | $isRebuilt |
Methods
Returns tables list.
Returns table columns list.
Returns table primary key.
Returns table primary key sequence.
Returns hasMany reference.
Returns belongsTo reference.
Rebuilds database structure cache.
Returns true if database cached structure has been rebuilt.
No description
No description
No description
No description
No description
Details
at line 31
__construct(Connection $connection, IStorage $cacheStorage)
No description
at line 38
array
getTables()
Returns tables list.
at line 45
array
getColumns($table)
Returns table columns list.
at line 54
string|array|null
getPrimaryKey($table)
Returns table primary key.
at line 67
string|null
getPrimaryKeySequence($table)
Returns table primary key sequence.
at line 91
mixed
getHasManyReference($table, $targetTable = NULL)
Returns hasMany reference.
If a targetTable is not provided, returns references for all tables.
at line 115
mixed
getBelongsToReference($table, $column = NULL)
Returns belongsTo reference.
If a column is not provided, returns references for all columns.
at line 136
mixed
rebuild()
Rebuilds database structure cache.
at line 143
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.
at line 149
protected
needStructure()
No description
at line 162
loadStructure()
internal |
No description
at line 199
protected
analyzePrimaryKey(array $columns)
No description
at line 218
protected
analyzeForeignKeys($structure, $table)
No description
at line 234
protected
resolveFQTableName($table)
No description