IStructure
interface IStructure
Provides cached reflection for database structure.
Constants
FIELD_TEXT |
|
FIELD_BINARY |
|
FIELD_BOOL |
|
FIELD_INTEGER |
|
FIELD_FLOAT |
|
FIELD_DATE |
|
FIELD_TIME |
|
FIELD_DATETIME |
|
FIELD_UNIX_TIMESTAMP |
|
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 33
array
getTables()
Returns tables list.
at line 38
array
getColumns(string $table)
Returns table columns list.
at line 44
string|string[]|null
getPrimaryKey(string $table)
Returns table primary key.
at line 49
string|null
getPrimaryAutoincrementKey(string $table)
Returns autoincrement primary key name.
at line 54
string|null
getPrimaryKeySequence(string $table)
Returns table primary key sequence.
at line 60
array|null
getHasManyReference(string $table, string $targetTable = null)
Returns hasMany reference.
If a targetTable is not provided, returns references for all tables.
at line 66
array|null
getBelongsToReference(string $table, string $column = null)
Returns belongsTo reference.
If a column is not provided, returns references for all columns.
at line 71
void
rebuild()
Rebuilds database structure cache.
at line 76
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.