$ open source · GPL-3.0 — need a commercial license? imqueue.com →

QueryInterface.dropView() method

Drops a view, if it exists.

Signature:

dropView(viewName: string, options?: DropOptions): Promise<any>;

Parameters

Parameter

Type

Description

viewName

string

Name of the view to drop.

options

DropOptions

(Optional) cascade also drops whatever depends on the view.

Returns:

Promise<any>

The result of the drop statement.

Remarks

Issues DROP VIEW IF EXISTS, so it is safe to call for a view that was never created. A materialized view needs a different statement and is not covered.