feat(sqlserver): support linked server browsing
This commit is contained in:
1 parent
fc8ae4b69f
commit
9e75f62dbf
20 files changed
+617
-32
No files matched your search
@@ -12,6 +12,57 @@ pub async fn list_databases(
|
||||
dbx_core::schema::list_databases_core(&state, &connection_id).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_sqlserver_linked_servers(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
) -> Result<Vec<db::LinkedServerInfo>, String> {
|
||||
dbx_core::schema::list_sqlserver_linked_servers_core(&state, &connection_id).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_sqlserver_linked_server_catalogs(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
server: String,
|
||||
) -> Result<Vec<db::DatabaseInfo>, String> {
|
||||
dbx_core::schema::list_sqlserver_linked_server_catalogs_core(&state, &connection_id, &server).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_sqlserver_linked_server_schemas(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
server: String,
|
||||
catalog: String,
|
||||
) -> Result<Vec<String>, String> {
|
||||
dbx_core::schema::list_sqlserver_linked_server_schemas_core(&state, &connection_id, &server, &catalog).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_sqlserver_linked_server_tables(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
server: String,
|
||||
catalog: String,
|
||||
schema: String,
|
||||
filter: Option<String>,
|
||||
limit: Option<usize>,
|
||||
offset: Option<usize>,
|
||||
) -> Result<Vec<db::TableInfo>, String> {
|
||||
dbx_core::schema::list_sqlserver_linked_server_tables_core(
|
||||
&state,
|
||||
&connection_id,
|
||||
&server,
|
||||
&catalog,
|
||||
&schema,
|
||||
filter.as_deref(),
|
||||
limit,
|
||||
offset,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_schemas(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
Reference in new issue
Block a user