IStructure
interface IStructure
Provides cached reflection for database structure.
Constants
deprecated FIELD_TEXT |
|
deprecated FIELD_BINARY |
|
deprecated FIELD_BOOL |
|
deprecated FIELD_INTEGER |
|
deprecated FIELD_FLOAT |
|
deprecated FIELD_DECIMAL |
|
deprecated FIELD_DATE |
|
deprecated FIELD_TIME |
|
deprecated FIELD_DATETIME |
|
deprecated FIELD_UNIX_TIMESTAMP |
|
deprecated FIELD_TIME_INTERVAL |
|
Methods
Returns tables list.
Returns table columns list.
Returns table primary key.
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.
Details
at line 35
array
getTables()
Returns tables list.
at line 40
array
getColumns(string $table)
Returns table columns list.
at line 46
string|array|null
getPrimaryKey(string $table)
Returns table primary key.
at line 51
string|null
getPrimaryAutoincrementKey(string $table)
Returns autoincrement primary key name.
at line 56
string|null
getPrimaryKeySequence(string $table)
Returns table primary key sequence.
at line 62
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 68
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 73
void
rebuild()
Rebuilds database structure cache.
at line 78
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.