Skip to content

table.exists ​

Checks whether the model has a table.

TIP

For more control, such as other column types, indexes or keys, manage tables with SQL instead. Run CREATE, ALTER and DROP TABLE statements with DatasourceClient's execute.

js
table.exists(tableName)

Parameters ​

ParameterTypeDescription
tableNamestringThe table's name or id.

Returns ​

boolean

true if the table exists, otherwise false.

Examples ​

js
const exists = table.exists("users");