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

BaseModel.syncView() method

Creates this view, replacing whatever definition is in the database.

Signature:

static syncView(options?: SyncOptions): Promise<any>;

Parameters

Parameter

Type

Description

options

SyncOptions

(Optional) withoutDrop skips the drop.

Returns:

Promise<any>

The result of the create statement.

Remarks

Drops the view first unless withoutDrop is set. That drop is why a view another view selects from cannot be replaced this way, and why withoutDrop exists.

Only meaningful on a model declared with View or DynamicView — anything else has no definition to create.