Table
- Full name:
\Qubus\Expressive\Table
Methods
table
Define the working table and create a new instance
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tableName | string | Table name. |
$alias | ?string | The table alias name. |
getTableName
Return the name of the table.
setTableAlias
Set the table alias.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$alias | string |
getTableAlias
Get table Alias
setStructure
public setStructure(string $primaryKeyName = 'id', string $foreignKeyName = '%s_id'): \Qubus\Expressive\Database
Parameters:
| Parameter | Type | Description |
|---|---|---|
$primaryKeyName | string | The primary key, ie: id |
$foreignKeyName | string | The foreign key as a pattern: %s_id, |
| where %s will be substituted with the table name |
setTablePrefix
Parameters:
| Parameter | Type | Description |
|---|---|---|
$tablePrefix | string|null |
getTablePrefix
Return the table prefix.
getStructure
Return the table structure.
getPrimaryKeyname
Get the primary key name.
getForeignKeyname
Get foreign key name.