Structure
class Structure implements IStructure
Cached reflection of database structure.
Properties
protected | $connection | ||
protected | $cache | ||
protected | $structure | ||
protected | $isRebuilt |
Methods
Returns tables list.
Returns table columns list.
No description
Returns autoincrement primary key name.
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, Storage $cacheStorage)
No description
at line 38
array
getTables()
Returns tables list.
at line 45
array
getColumns(string $table)
Returns table columns list.
at line 57
string|array|null
getPrimaryKey(string $table)
No description
at line 65
string|null
getPrimaryAutoincrementKey(string $table)
Returns autoincrement primary key name.
at line 95
string|null
getPrimaryKeySequence(string $table)
Returns table primary key sequence.
at line 120
array|null
getHasManyReference(string $table, string|null $targetTable = null)
Returns hasMany reference.
If a targetTable is not provided, returns references for all tables.
at line 141
array|null
getBelongsToReference(string $table, string|null $column = null)
Returns belongsTo reference.
If a column is not provided, returns references for all columns.
at line 158
void
rebuild()
Rebuilds database structure cache.
at line 165
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.
at line 171
protected void
needStructure()
No description
at line 181
protected array
loadStructure()
No description
at line 216
protected
analyzePrimaryKey(array $columns)
No description
at line 235
protected void
analyzeForeignKeys(array $structure, string $table)
No description
at line 260
protected string
resolveFQTableName(string $table)
No description
Traits
Strict class for better experience.