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.

mixed
getHasManyReference($table, $targetTable = NULL)

Returns hasMany reference.

mixed
getBelongsToReference($table, $column = NULL)

Returns belongsTo reference.

mixed
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.

Return Value

array

at line 39
array getColumns($table)

Returns table columns list.

Parameters

$table

Return Value

array

at line 46
string|array|null getPrimaryKey($table)

Returns table primary key.

Parameters

$table

Return Value

string|array|null

at line 53
string|null getPrimaryKeySequence($table)

Returns table primary key sequence.

Parameters

$table

Return Value

string|null

at line 62
mixed getHasManyReference($table, $targetTable = NULL)

Returns hasMany reference.

If a targetTable is not provided, returns references for all tables.

Parameters

$table
$targetTable

Return Value

mixed

at line 71
mixed getBelongsToReference($table, $column = NULL)

Returns belongsTo reference.

If a column is not provided, returns references for all columns.

Parameters

$table
$column

Return Value

mixed

at line 77
mixed rebuild()

Rebuilds database structure cache.

Return Value

mixed

at line 83
bool isRebuilt()

Returns true if database cached structure has been rebuilt.

Return Value

bool