Structure
class Structure 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.
No description
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 33
__construct(Connection $connection, IStorage $cacheStorage)
No description
at line 40
array
getTables()
Returns tables list.
at line 47
array
getColumns($table)
Returns table columns list.
at line 56
string|array|null
getPrimaryKey($table)
Returns table primary key.
at line 69
getPrimaryAutoincrementKey($table)
No description
at line 98
string|null
getPrimaryKeySequence($table)
Returns table primary key sequence.
at line 123
array|null
getHasManyReference($table, $targetTable = null)
Returns hasMany reference.
If a targetTable is not provided, returns references for all tables.
at line 147
array|null
getBelongsToReference($table, $column = null)
Returns belongsTo reference.
If a column is not provided, returns references for all columns.
at line 168
void
rebuild()
Rebuilds database structure cache.
at line 175
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.
at line 181
protected
needStructure()
No description
at line 194
loadStructure()
internal |
No description
at line 231
protected
analyzePrimaryKey(array $columns)
No description
at line 250
protected
analyzeForeignKeys($structure, $table)
No description
at line 266
protected
resolveFQTableName($table)
No description