Structure
class Structure
internal |
Provides database structure metadata with caching.
Properties
protected | $structure | ||
protected | $isRebuilt |
Methods
array
getTables()
No description
array
getColumns(string $table)
No description
string|array|null
getPrimaryKey(string $table)
No description
string|null
getPrimaryAutoincrementKey(string $table)
No description
string|null
getPrimaryKeySequence(string $table)
No description
array
getHasManyReference(string $table)
No description
array
getBelongsToReference(string $table)
No description
void
rebuild()
Rebuilds structure cache.
bool
isRebuilt()
No description
void
needStructure()
No description
array
loadStructure()
Loads complete structure from database.
string|array|null
analyzePrimaryKey(array $columns)
No description
void
analyzeForeignKeys(array $structure, string $table)
No description
string
resolveFQTableName(string $table)
Returns normalized table name.
Details
at line 26
__construct(Engine $engine, Cache $cache)
No description
at line 33
array
getTables()
No description
at line 40
array
getColumns(string $table)
No description
at line 52
string|array|null
getPrimaryKey(string $table)
No description
at line 60
string|null
getPrimaryAutoincrementKey(string $table)
No description
at line 90
string|null
getPrimaryKeySequence(string $table)
No description
at line 115
array
getHasManyReference(string $table)
No description
at line 123
array
getBelongsToReference(string $table)
No description
at line 134
void
rebuild()
Rebuilds structure cache.
at line 141
bool
isRebuilt()
No description
at line 147
protected void
needStructure()
No description
at line 160
protected array
loadStructure()
Loads complete structure from database.
at line 193
protected string|array|null
analyzePrimaryKey(array $columns)
No description
at line 212
protected void
analyzeForeignKeys(array $structure, string $table)
No description
at line 234
protected string
resolveFQTableName(string $table)
Returns normalized table name.