mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-29 00:01:20 +00:00
feat: schema graph via FK introspection
- GET .../db-connections/:id/foreign-keys — per-dialect information_schema/pragma query through dbx_execute_query, identifier-whitelisted, read-role gated - Databases page: Graph tab renders tables as radial SVG nodes with FK edges; hover highlights adjacency, click inspects the table - demo stubs for edges + wider demo table set Authored By: TDvorak <[email protected]>
This commit is contained in:
1 parent
627bd89d5e
commit
d57f30cd59
12 files changed
+496
-2
No files matched your search
@@ -8,6 +8,7 @@ import type { DBConnectionListResponse } from '../models/DBConnectionListRespons
|
||||
import type { DBConnectionTestResult } from '../models/DBConnectionTestResult';
|
||||
import type { DBDatabaseListResponse } from '../models/DBDatabaseListResponse';
|
||||
import type { DBDescribeResponse } from '../models/DBDescribeResponse';
|
||||
import type { DBForeignKeysResponse } from '../models/DBForeignKeysResponse';
|
||||
import type { DBQueryRequest } from '../models/DBQueryRequest';
|
||||
import type { DBQueryResponse } from '../models/DBQueryResponse';
|
||||
import type { DBRedisRequest } from '../models/DBRedisRequest';
|
||||
@@ -244,6 +245,38 @@ export class DatabasesService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns DBForeignKeysResponse Foreign key edges for the schema graph
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listDbForeignKeys({
|
||||
projectId,
|
||||
connectionId,
|
||||
database,
|
||||
schema,
|
||||
}: {
|
||||
projectId: string,
|
||||
connectionId: string,
|
||||
database?: string,
|
||||
schema?: string,
|
||||
}): CancelablePromise<DBForeignKeysResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/db-connections/{connectionID}/foreign-keys',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'connectionID': connectionId,
|
||||
},
|
||||
query: {
|
||||
'database': database,
|
||||
'schema': schema,
|
||||
},
|
||||
errors: {
|
||||
404: `Error response`,
|
||||
502: `Error response`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns DBQueryResponse Query result (at most 100 rows)
|
||||
* @throws ApiError
|
||||
|
||||
Reference in new issue
Block a user