List all tables within a database.
r.tableList() → cursor r.db(dbName).tableList() → cursor
const cursor = await r.tableList().run(client); const tables = await cursor.toArray(); console.log('Tables in default database:', tables); // Output: ['posts', 'users', 'comments']
const cursor = await r.db('ecommerce').tableList().run(client); const tables = await cursor.toArray(); console.log('Tables in ecommerce database:', tables);
r
db
dbList
table
tableCreate
tableDrop