feat(postgres): list user-defined types with details and DDL for PG-family databases
This commit is contained in:
1 parent
0c6c1fada2
commit
154c460657
59 files changed
+6538
-150
No files matched your search
@@ -157,6 +157,7 @@ export const listObjectStatistics = forward("listObjectStatistics");
|
||||
export const listCompletionObjects = forward("listCompletionObjects");
|
||||
export const completionAssistantSearch = forward("completionAssistantSearch");
|
||||
export const getObjectSource = forward("getObjectSource");
|
||||
export const getCustomTypeDetails = forward("getCustomTypeDetails");
|
||||
export const getColumns = forward("getColumns");
|
||||
export const getAllColumns = forward("getAllColumns");
|
||||
export const getSqlServerColumnMetadata = forward("getSqlServerColumnMetadata");
|
||||
|
||||
@@ -14,6 +14,7 @@ import type {
|
||||
CompletionAssistantRequest,
|
||||
CompletionAssistantResponse,
|
||||
ObjectStatistics,
|
||||
CustomTypeDetails,
|
||||
ObjectSource,
|
||||
ObjectSourceKind,
|
||||
ColumnInfo,
|
||||
@@ -742,6 +743,10 @@ export async function getObjectSource(connectionId: string, database: string, sc
|
||||
return get(`/api/schema/object-source?${qs({ connection_id: connectionId, database, schema, table: name, object_type: objectType, signature, relation_name: relationName })}`);
|
||||
}
|
||||
|
||||
export async function getCustomTypeDetails(connectionId: string, database: string, schema: string, name: string): Promise<CustomTypeDetails> {
|
||||
return get(`/api/schema/custom-type-details?${qs({ connection_id: connectionId, database, schema, table: name })}`);
|
||||
}
|
||||
|
||||
export async function getColumns(connectionId: string, database: string, schema: string, table: string, catalog?: string, clientSessionId?: string): Promise<ColumnInfo[]> {
|
||||
return get(`/api/schema/columns?${qs({ connection_id: connectionId, database, schema, table, catalog, client_session_id: clientSessionId })}`);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import type {
|
||||
CompletionAssistantRequest,
|
||||
CompletionAssistantResponse,
|
||||
ObjectStatistics,
|
||||
CustomTypeDetails,
|
||||
ObjectSource,
|
||||
ObjectSourceKind,
|
||||
ColumnInfo,
|
||||
@@ -1055,6 +1056,9 @@ export async function listSchemaInfos(connectionId: string, database: string): P
|
||||
return invoke("list_schema_infos", { connectionId, database });
|
||||
}
|
||||
|
||||
export async function getCustomTypeDetails(connectionId: string, database: string, schema: string, name: string): Promise<CustomTypeDetails> {
|
||||
return invoke("get_custom_type_details", { connectionId, database, schema, name });
|
||||
}
|
||||
export async function getColumns(connectionId: string, database: string, schema: string, table: string, catalog?: string, clientSessionId?: string): Promise<ColumnInfo[]> {
|
||||
return invoke("get_columns", {
|
||||
connectionId,
|
||||
|
||||
Reference in new issue
Block a user