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
array
getTables()
Returns tables list.
array
getColumns($table)
Returns table columns list.
string|array|null
getPrimaryKey($table)
Returns table primary key.
string|null
getPrimaryKeySequence($table)
Returns table primary key sequence.
array|null
getHasManyReference($table, $targetTable = null)
Returns hasMany reference.
array|null
getBelongsToReference($table, $column = null)
Returns belongsTo reference.
void
rebuild()
Rebuilds database structure cache.
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.
Details
at line 32
array
getTables()
Returns tables list.
at line 39
array
getColumns($table)
Returns table columns list.
at line 46
string|array|null
getPrimaryKey($table)
Returns table primary key.
at line 60
string|null
getPrimaryKeySequence($table)
Returns table primary key sequence.
at line 69
array|null
getHasManyReference($table, $targetTable = null)
Returns hasMany reference.
If a targetTable is not provided, returns references for all tables.
at line 78
array|null
getBelongsToReference($table, $column = null)
Returns belongsTo reference.
If a column is not provided, returns references for all columns.
at line 84
void
rebuild()
Rebuilds database structure cache.
at line 90
bool
isRebuilt()
Returns true if database cached structure has been rebuilt.