Skip to content

table.list ​

Lists the model's tables.

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.list()

Returns ​

string

The table names, as a JSON array string. Use JSON.parse() to read it.

Examples ​

js
const tables = JSON.parse(table.list());
json
["users", "products"]