View
Less than 1 minute
View
Trait View.
trait ViewProvides methods for managing database views, including listing, describing, creating, checking existence, and dropping views. Intended for use in DBI adapters supporting SQL view operations.
Methods
listViews
Retrieves a list of views from the database.
public listViews(): voiddescribeView
Retrieves the description of a database view.
public describeView(string $name, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the view |
$ | false |
createView
Create a new view in the database.
public createView(string $name, mixed $content, bool $replace): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the view to create |
$content | mixed | the SQL content or specification for the view |
$replace | bool | if true, replaces an existing view with the same name |
viewExists
Check if a view exists in the database.
public viewExists(string $viewName): boolParameters
| Parameter | Type | Description |
|---|---|---|
$viewName | string | the name of the view to check for existence |
dropView
Drop a view from the database.
public dropView(string $name, bool $cascade, bool $ifExists): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the view to drop |
$cascade | bool | whether to drop CASCADE |
$ifExists | bool | if true, only drops the view if it exists |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000