Skip to content

database.hasTable()

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

Check if a table exists.

Syntax

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

Return Value

  • A boolean indicating whether exists or not

Usage

Check if table exists:

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