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
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
ConnectionConfig,
|
||||
DatabaseInfo,
|
||||
LinkedServerInfo,
|
||||
TableInfo,
|
||||
ObjectInfo,
|
||||
ObjectSource,
|
||||
@@ -392,6 +393,22 @@ export async function listDatabases(connectionId: string): Promise<DatabaseInfo[
|
||||
return get(`/api/schema/databases?${qs({ connection_id: connectionId })}`);
|
||||
}
|
||||
|
||||
export async function listSqlServerLinkedServers(connectionId: string): Promise<LinkedServerInfo[]> {
|
||||
return get(`/api/schema/sqlserver/linked-servers?${qs({ connection_id: connectionId })}`);
|
||||
}
|
||||
|
||||
export async function listSqlServerLinkedServerCatalogs(connectionId: string, server: string): Promise<DatabaseInfo[]> {
|
||||
return get(`/api/schema/sqlserver/linked-server-catalogs?${qs({ connection_id: connectionId, server })}`);
|
||||
}
|
||||
|
||||
export async function listSqlServerLinkedServerSchemas(connectionId: string, server: string, catalog: string): Promise<string[]> {
|
||||
return get(`/api/schema/sqlserver/linked-server-schemas?${qs({ connection_id: connectionId, server, catalog })}`);
|
||||
}
|
||||
|
||||
export async function listSqlServerLinkedServerTables(connectionId: string, server: string, catalog: string, schema: string, filter?: string, limit?: number, offset?: number): Promise<TableInfo[]> {
|
||||
return get(`/api/schema/sqlserver/linked-server-tables?${qs({ connection_id: connectionId, server, catalog, schema, filter, limit, offset })}`);
|
||||
}
|
||||
|
||||
export async function saveSchemaCache(cacheKey: string, payload: unknown): Promise<void> {
|
||||
return post("/api/schema/cache", { cacheKey, payload });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user