List all schema ids sorted ascending. Returns an empty vector if the schema directory is missing or empty. Mirrors Java [SchemaManager.listAllIds()](https://github.com/apache/paimon/blob/release-1.3/paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java).
(&self)
| 82 | /// |
| 83 | /// Mirrors Java [SchemaManager.listAllIds()](https://github.com/apache/paimon/blob/release-1.3/paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java). |
| 84 | pub async fn list_all_ids(&self) -> crate::Result<Vec<i64>> { |
| 85 | let mut ids: Vec<i64> = self |
| 86 | .file_io |
| 87 | .list_status(&self.schema_directory()) |
| 88 | .await? |
| 89 | .into_iter() |
| 90 | .filter(|s| !s.is_dir) |
| 91 | .filter_map(|s| { |
| 92 | get_basename(s.path.as_str()) |
| 93 | .strip_prefix(SCHEMA_PREFIX)? |
| 94 | .parse::<i64>() |
| 95 | .ok() |
| 96 | }) |
| 97 | .collect(); |
| 98 | ids.sort_unstable(); |
| 99 | Ok(ids) |
| 100 | } |
| 101 | |
| 102 | /// List all schemas sorted by id ascending. |
| 103 | /// |
no test coverage detected