Table
Less than 1 minute
Table
Methods
listTables
List all tables in the database.
public listTables(): voidtableExists
Check if a table exists in the database.
public tableExists(string $tableName): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string |
createTable
Create a new table in the database.
public createTable(string $tableName, mixed $columns): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$columns | mixed |
describeTable
Describe a table in the database.
public describeTable(string $tableName, ?string $sort, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$sort | string | |
$ | false |
renameTable
Rename a table in the database.
public renameTable(string $fromName, string $toName): boolParameters
| Parameter | Type | Description |
|---|---|---|
$fromName | string | |
$toName | string |
dropTable
Drop a table from the database.
public dropTable(string $name, bool $ifExists, bool $cascade): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$ifExists | bool | |
$cascade | bool |
addColumn
Add a column to a table in the database.
public addColumn(string $tableName, mixed $columnSpec): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$columnSpec | mixed |
alterColumn
Alter a column in a table in the database.
public alterColumn(string $tableName, string $column, mixed $columnSpec): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$column | string | |
$columnSpec | mixed |
dropColumn
Drop a column from a table in the database.
public dropColumn(string $tableName, string $column, bool $ifExists): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$column | string | |
$ifExists | bool |
truncate
Rename a column in a table in the database.
public truncate(string $tableName, bool $only, bool $restartIdentity, bool $cascade): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tableName | string | |
$only | bool | |
$restartIdentity | bool | |
$cascade | bool |
Generated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000