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
| Parameter | Type | Description |
|---|---|---|
tableName | string | The table's name or id. |
Returns
booleantrue if the table exists, otherwise false.
Examples
js
const exists = table.exists("users");