Skip to content

database.hasTable()

Oxford Harrison edited this page Nov 9, 2024 · 4 revisions

Check if a table exists.

Syntax

database.hasTable(
    name: string,
): Promise<boolean>;
Param Type Description
name string A table name.

Return Value

  • boolean: A boolean indicating whether exists or not

Usage

Check if table exists:

const exists = await database.hasTable('table_1');
Clone this wiki locally