全部产品
Search
文档中心

Tablestore:Mengambil nama tabel data

更新时间:Jul 02, 2025

Topik ini menjelaskan cara mengambil nama tabel data dalam instance Tablestore menggunakan Tablestore SDK for Java.

Prasyarat

Klien telah diinisialisasi. Untuk informasi lebih lanjut, lihat Initialize a Tablestore client.

Metode

public ListTableResponse listTable() throws TableStoreException, ClientException

Contoh kode

Berikut adalah contoh kode yang menunjukkan cara mengambil nama tabel data dalam sebuah instance dan mencetak nama-nama tersebut:

public static void listTableExample(SyncClient client) {
    ListTableResponse response = client.listTable();
    for(String tableName : response.getTableNames()) {
        System.out.println(tableName);
    }
}

Referensi

Untuk informasi lebih lanjut, lihat Query the names of time series tables.