MCPcopy Create free account
hub / github.com/apache/paimon-rust / list_databases

Method list_databases

crates/paimon/src/api/rest_api.rs:178–195  ·  view source on GitHub ↗

List all databases.

(&self)

Source from the content-addressed store, hash-verified

176
177 /// List all databases.
178 pub async fn list_databases(&self) -> Result<Vec<String>> {
179 let mut results = Vec::new();
180 let mut page_token: Option<String> = None;
181
182 loop {
183 let paged = self
184 .list_databases_paged(None, page_token.as_deref(), None)
185 .await?;
186 let is_empty = paged.elements.is_empty();
187 results.extend(paged.elements);
188 page_token = paged.next_page_token;
189 if page_token.is_none() || is_empty {
190 break;
191 }
192 }
193
194 Ok(results)
195 }
196
197 /// List databases with pagination.
198 pub async fn list_databases_paged(

Callers 1

mainFunction · 0.45

Calls 2

list_databases_pagedMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected