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 all tables in the database.
Returns all columns in a table.
Returns table primary key.
Returns autoincrement primary key name.
Returns table primary key sequence.
Returns tables referencing the given table via foreign key, or null if unknown.
Returns foreign key columns in the given table mapped to their referenced tables, or null if unknown.
Rebuilds database structure cache.
Checks whether the structure has been rebuilt from the database during this request.
Details
at line 33
array
getTables()
Returns all tables in the database.
at line 39
array
getColumns(string $table)
Returns all columns in a table.
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)
Returns tables referencing the given table via foreign key, or null if unknown.
at line 67
array|null
getBelongsToReference(string $table)
Returns foreign key columns in the given table mapped to their referenced tables, or null if unknown.
at line 72
void
rebuild()
Rebuilds database structure cache.
at line 77
bool
isRebuilt()
Checks whether the structure has been rebuilt from the database during this request.