You can call the ListTable operation to query the names of all tables that are created in the current instance.
Prerequisites
An OTSClient instance is initialized. For more information, see Initialize an OTSClient instance.
A data table is created. For more information, see Create a data table.
API operation
/**
* Query the names of all tables in the current instance.
*/
listTable(params, callback)
Examples
The following sample code provides an example on how to query the names of all tables in an instance:
var client = require('./client');
client.listTable({}, function (err, data) {
if (err) {
console.log('error:', err);
return;
}
console.log('success:', data);
});
References
For information about the API operation that you can call to query the names of tables, see ListTable. For the detailed sample code, visit ListTable@GitHub.
You can update a table to modify the information about the table, such as the time to live (TTL) and max versions. For more information, see Update the configurations of a table.
You can call API operations to read and write data in a table. see Basic operations on data.
You can query the description of a table to view the configuration information about the table, such as the max versions and TTL. For more information, see Query the description of a table.
You can delete a data table that you no longer require. For more information, see Delete data tables.