IStructure
interface IStructure
Provides cached reflection for database structure.
Constants
FIELD_TEXT |
|
FIELD_BINARY |
|
FIELD_BOOL |
|
FIELD_INTEGER |
|
FIELD_FLOAT |
|
FIELD_DECIMAL |
|
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 34
array
getTables()
Returns tables list.
at line 39
array
getColumns(string $table)
Returns table columns list.
at line 45
string|array|null
getPrimaryKey(string $table)
Returns table primary key.
at line 50
string|null
getPrimaryAutoincrementKey(string $table)
Returns autoincrement primary key name.
at line 55
string|null
getPrimaryKeySequence(string $table)
Returns table primary key sequence.
at line 61
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 67
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 72
void
rebuild()
Rebuilds database structure cache.
at line 77
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.