feat(xugu): expose tablespaces and datafiles in tree
This commit is contained in:
1 parent
afe3b3f3c2
commit
351a8b699b
32 files changed
+811
-4
No files matched your search
@@ -457,6 +457,7 @@ async fn main() {
|
||||
.route("/schema/databases", get(routes::schema::list_databases))
|
||||
.route("/schema/database-metadata", get(routes::schema::list_database_metadata))
|
||||
.route("/schema/database-storage", post(routes::schema::list_database_storage))
|
||||
.route("/schema/xugu/tablespaces", get(routes::schema::list_xugu_tablespaces))
|
||||
.route("/schema/sqlserver/completion-context", get(routes::schema::get_sqlserver_completion_context))
|
||||
.route("/schema/doris/catalogs", get(routes::schema::list_doris_catalogs))
|
||||
.route("/schema/doris/catalog-databases", get(routes::schema::list_doris_catalog_databases))
|
||||
|
||||
@@ -64,6 +64,16 @@ pub async fn list_database_storage(
|
||||
Ok(Json(result))
|
||||
}
|
||||
|
||||
pub async fn list_xugu_tablespaces(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Query(q): Query<SchemaQuery>,
|
||||
) -> Result<Json<Vec<dbx_core::db::XuguTablespaceInfo>>, AppError> {
|
||||
let result = dbx_core::schema::list_xugu_tablespaces_core(&state.app, &q.connection_id, q.database.as_deref())
|
||||
.await
|
||||
.map_err(AppError::from)?;
|
||||
Ok(Json(result))
|
||||
}
|
||||
|
||||
pub async fn get_sqlserver_completion_context(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Query(q): Query<SchemaQuery>,
|
||||
|
||||
Reference in new issue
Block a user