public listTables(): void
public tableExists(string $tableName): bool
Parameter | Type | Description |
---|
$tableName | string | |
public createTable(string $tableName, mixed $columns): bool
Parameter | Type | Description |
---|
$tableName | string | |
$columns | mixed | |
public describeTable(string $tableName, ?string $sort, false $): void
Parameter | Type | Description |
---|
$tableName | string | |
$sort | string | |
$ | false | |
public renameTable(string $fromName, string $toName): bool
Parameter | Type | Description |
---|
$fromName | string | |
$toName | string | |
public dropTable(string $name, bool $ifExists = false, bool $cascade = false): bool
Parameter | Type | Description |
---|
$name | string | |
$ifExists | bool | |
$cascade | bool | |
public addColumn(string $tableName, mixed $columnSpec): bool
Parameter | Type | Description |
---|
$tableName | string | |
$columnSpec | mixed | |
public alterColumn(string $tableName, string $column, mixed $columnSpec): bool
Parameter | Type | Description |
---|
$tableName | string | |
$column | string | |
$columnSpec | mixed | |
public dropColumn(string $tableName, string $column, bool $ifExists = false): bool
Parameter | Type | Description |
---|
$tableName | string | |
$column | string | |
$ifExists | bool | |
TRUNCATE empty a table or set of tables.
public truncate(string $tableName, bool $only = false, bool $restartIdentity = false, bool $cascade = false): bool
TRUNCATE quickly removes all rows from a set of tables. It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. This is most useful on large tables.
Parameter | Type | Description |
---|
$tableName | string | The name of the table(s) to truncate. Multiple tables are supported. |
$only | bool | Only the named table is truncated. If FALSE, the table and all its descendant tables (if any) are truncated. |
$restartIdentity | bool | Automatically restart sequences owned by columns of the truncated table(s). The default is to no restart. |
$cascade | bool | If TRUE, automatically truncate all tables that have foreign-key references to any of the named tables, or |
to any tables added to the group due to CASCADE. If FALSE, Refuse to truncate if any of the tables have
foreign-key references from tables that are not listed in the command. FALSE is the default. |
Generated by Hazaar API Doc Generator